Menghitung Program Struktur
CARA MENGHITUNG
LUAS,KELILING DAN SISI MIRING SEGITIGA
#include "iostream.h"
#include "math.h"
#include "conio.h"
int main(){
float Al,Ting,Si,Ls,Kl;
cout<<"\n************PROGRAM
MENGHITUNG************";
cout<<"\n***SISI
MIRING, LUAS, KELILING SEGITIGA***";
cout<<"\n******************************************";
cout<<"\n";
cout<<"\n";
cout<<"masukkan
panjang alas\t ";cin>>Al;
cout<<"masukkan
panjang tinggi\t ";cin>>Ting;
Si=sqrt((Al*Al)+(Ting*Ting));
clrscr();
cout<<"\n*****************HASILNYA*****************";
cout<<"\n\tSisi
miring\t\t ";cout<<Si;
cout<<"\n\tLuas
segitiga\t\t ";cout<<((Al*Ting)/2);
cout<<"\n\tKeliling
segitiga\t ";cout<<(Al+Ting+Si);
cout<<"\n******************************************";
cout<<"\n";
cout<<"\n\t\tTerima
Kasih";
getch();
}
0 komentar:
Posting Komentar