31 January 2008

Konstanta 2

#include <iostream.h>

#include <conio.h>

#define phi 3.14

main ( )

{

int r; float luas; float kel;

r = 5;

luas = phi * ( r * r );

kel = 2 * phi * r;

cout<<"Program menghitung luas dan keliling lingkaran"<<endl;

cout<<"Luas = "<<phi<<"*"<<"("<<r<<"*"<<r<<")"<<" = "<<luas<<endl;

cout<<"Keliling = "<<2<<"*"<<phi<<"*"<<r<<" = "<<kel<<endl;

getch ( );

}

COMMENTS :

Don't Spam Here

0 komentar to “Konstanta 2”

 

Copyright © 2009 Fresh Themes Gallery | NdyTeeN. All Rights Reserved. Powered by Blogger and Distributed by Blogtemplate4u .