#Diktat Alpro Bab 6 - Latihan No. 4
Program Menghitung Luas lingkaran
#include <cstdlib>
#include <iostream>
#include <conio.h>
using namespace std;
void luas(int r){
int hasil,phi;
phi=3,14;
hasil=phi*r*r;
cout<<"Hasil luas lingkaran : "<<hasil<<endl;
}
int main(int argc, char *argv[])
{
int r;
cout<<"|=========================|\n";
cout<<"| Program Menghitung Luas |\n";
cout<<"| Lingkaran |\n";
cout<<"|=========================|\n";
cout<<"Masukkan jari-jari : ";cin>>r;
luas(r);
system("pause");
return 0;
}
Rabu, 13 April 2016
Diktat Alpro Bab 6 - Latihan No. 4
01.48
No comments
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar