Jumat, 04 Februari 2011

SEGITIGA C++

#include "iostream.h"
#include "conio.h"
#include "math.h"
#include "complex.h"

void main ()
{
int a,b,c,d,e;
clrscr();
cout<<"alas: ";
cin>>a;
cout<<"tinggi : ";
cin>>b;
c=sqrt(a/2*a/2+b*b);
cout<<"sisi miring : ";
cout<<c;
d=a*b/2;
cout<<"luas : ";
cout<<d;
e=a+2*c;
cout<<"keliling : ";
cout<<e;
getch();
}

Tidak ada komentar:

Posting Komentar