#include <iostream>
#include <string.h>
#include <cmath>
using namespace std;
int main() {
int Alas, Tinggi, sisi_miring, Mode;
puts("======================================================");
puts("Program Menghitung Segitiga Siku Siku ");
puts("======================================================");
cout<<"Masukkan Mode"<<endl<<"[1: Luas, 2: Keliling] \t :";
scanf("%d", &Mode); cout<<endl;
cout<<"Masukkan Alas Segitiga : ";scanf("%d", &Alas);
cout<<"\nMasukkan Tinggi Segitiga : ";scanf("%d", &Tinggi);
puts("\n======================================================");
cout<<"Nilai Alas adalah \t : "<<Alas<<endl;
cout<<"Nilai Tinggi adalah \t : "<<Tinggi;
float Luas, Keliling;
if (Mode == 1) {
Luas = (0.5 * Alas * Tinggi);
printf("\nMode yang dipilih : Menghitung Luas \nLuas Segitiga Sama Kaki : %.2f ", Luas);
} else if (Mode == 2) {
sisi_miring = sqrt(pow(Alas,2)+pow(Tinggi,2));
Keliling = (Tinggi * Alas);
printf("\nMode yang dipilih \t : Menghitung Keliling \nKeliling Segitiga Sama Kaki : %.2f ", Keliling);
}
puts("\n======================================================");
cout <<"Muhammad Chairul Ramadhani"<<endl;
cout <<"Irulmuhammad50@gmail.com";
cout <<"\nNama = Muhammad Chairul Ramadhani"<<endl;
cout <<"Nim = 1620230015";
return 0;
}