Program Mencari Luas Lingkaran & Volume Bola C++

Rabu, 09 Februari 2011 #include <iostream.h>
#include <conio.h>
#define phi 3.14

float luasling ( float r)
{
float Luas ;
Luas = phi *r*r;
return Luas;
}

float volbol (float r)
{
float Volume;
Volume = (4.0/3 * phi ) *r*r*r;
return Volume;
}

void main ()
{
float jariJari;
cout<< "Menghitung Luas Lingkaran & Volume Bola"<< endl; cout <<"----------------------------------------"<< endl; cout<<" - Masukan Jari-Jari = "; cin>>jariJari;
cout <<" =============================="<<<" - Luas lingkaran = "<<< endl; cout <<" - Volume Bola = "<<<<" =============================="; }

0 komentar:

Posting Komentar

 
 
 
 
Copyright © Oes blog