Contoh Sederhana C++
#include <conio.h> #include <iosteam.h> #include <math.h> main () { int y,x; float q; q=2; clrscr; cout <<"\n+++++++++++++++++++++++++++++++++++++++++++++++++"; cout <<"\n+ Praktikum C Dasar +"; cout <<"\n+ Diagonal Segitiga Siku - siku +"; cout <<"\n+++++++++++++++++++++++++++++++++++++++++++++++++"; cout <<"\n"; cout <<"\n"; cout <<"\n"; cout <<"\nTinggi Segitiga : "; cin >> x;cout <<"cm"; cout <<"\nAlas Segiiga : "; cin >> y;cout <<"cm" cout <<"\nDiagonal : " <<sqrt(pow(x,q)+pow(y,q)); getch();
Subscribe Now