//Mencari Luas lingkaran & Luas Silinder
#include<iostream.h>
int main()
{
double PI=3.14;
double luas_linkaran,jari_jari,tinggi_silinder;
cout<<"======================================"<<endl;
cout<<"MENCARI LUAS LINKARAN & LUAS SILINDER"<<endl;
cout<<"--------------------------------------"<<endl;
cout<<"Masukkan Jari-Jari Lingkaran\t= "; //Input nilai jari-jari lingkaran
cin>>jari_jari;
luas_linkaran=jari_jari*jari_jari*PI; //Rumus Luas Linkaran
cout<<"Luas Linkaran\t\t\t= "<<luas_linkaran<<endl; //Hasil Luas lingkaran
cout<<"Masukkan Tinggi Silinder\t= "; //Input tinggi silinder
cin>>tinggi_silinder;
cout<<"Luas Silinder\t\t\t= "<<luas_linkaran*tinggi_silinder<<endl; /Hasil Luas silinder
cout<<"======================================"<<endl<<endl;
return 0;
}
#include<iostream.h>
int main()
{
double PI=3.14;
double luas_linkaran,jari_jari,tinggi_silinder;
cout<<"======================================"<<endl;
cout<<"MENCARI LUAS LINKARAN & LUAS SILINDER"<<endl;
cout<<"--------------------------------------"<<endl;
cout<<"Masukkan Jari-Jari Lingkaran\t= "; //Input nilai jari-jari lingkaran
cin>>jari_jari;
luas_linkaran=jari_jari*jari_jari*PI; //Rumus Luas Linkaran
cout<<"Luas Linkaran\t\t\t= "<<luas_linkaran<<endl; //Hasil Luas lingkaran
cout<<"Masukkan Tinggi Silinder\t= "; //Input tinggi silinder
cin>>tinggi_silinder;
cout<<"Luas Silinder\t\t\t= "<<luas_linkaran*tinggi_silinder<<endl; /Hasil Luas silinder
cout<<"======================================"<<endl<<endl;
return 0;
}
Download Hasil: LuasLinkaranSilinder.exe
Screenshot: