Anda di halaman 1dari 3

# 


#include <iostream>
/*****************************
Menghitung Luas Belah Ketupat
*****************************/
using namespace std;

int main()
{
int diagonal1, diagonal2;
cout<<"////////////////////////////////////////////" << endl;
cout<<"//// Menghitung Luas Belah Ketupat ////" << endl;
cout<<"///////////////////////////////////////////" << endl;
cout<<"Masukan Diagonal 1: ";cin>>diagonal1;
cout<<"Masukan Diagonal 2: ";cin>>diagonal2;
cout<<"////////////////////////////////////////////" << endl;
cout<<"//// Created by Mochamad Yusuf ////" << endl;
cout<<"///////////////////////////////////////////" << endl;
cout<<"Hasil Luas Belah Ketupat Adalah: " <<diagonal1*diagonal2/2;
return 0;
}



#include <iostream>
/************************
Menghitung Luas Lingkaran
*************************/
using namespace std;
const float phi = 3.14;
int main()
{
int jari_jari;
cout<<"///////////////////////////////////////" << endl;
cout<<"//// Menghitung Luas Lingkaran ////" << endl;
cout<<"//////////////////////////////////////" << endl;
cout<<"Masukan Jari-Jari Lingkaran: ";cin>>jari_jari;
cout<<"////////////////////////////////////////" << endl;
cout<<"//// Created by Mochamad Yusuf ////" << endl;
cout<<"///////////////////////////////////////" << endl;
cout<<"Hasil Menghitung Luas Lingkaran Adalah: " << phi*jari_jari*jari_jari;
return 0;
}
Compile & Run

### Dapatkan aplikasi gratis kami

Hak cipta © 2021 Scribd Inc.