#include <iostream>
using namespace std;
int main() {
puts("=================================");
puts(" Program Percabangan Persegi");
puts("=================================");
int panjang, lebar, mode;
cout<<"Masukan Panjang Persegi\t: "; scanf("%d",&panjang);
cout<<"Masukan Lebar Persegi\t: "; scanf("%d",&lebar);
puts("=================================");
cout<<"Masukan Mode [1:Luas, 2:Keliling]\t: "; scanf("%d",&mode);
if (mode == 1) {
const int luas = panjang * lebar;
printf("Luas Persegi Adalah: %d\n", luas);
} else {
const int kell = 2 * (panjang + lebar);
printf("Keliling Persegi Adalah: %d\n", kell);
}
puts("=================================");
puts("Nama\t: Irsyad Purbha");
puts("Email\t: irsyadpurbha.fst@uia.ac.id");
return 0;
}