Powered By Blogger Submit Your Site To The Web's Top 50 Search Engines for Free! Online Marketing

Subscribe Now

Wednesday, August 24

Menghitung Diagonal Segitiga Menggunakan C++


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();

Related Posts


1 Comments:

wah postingannya keren banget mau coba2 ah belajar C++.
link back ya.. ditunggu kunjungannya
http://telepongenggam-jimmy63.blogspot.com/

Post a Comment

Popular Posts This Months

Related Posts Plugin for WordPress, Blogger...