using namespace std;
int main(){
int n1, n2;
int h1, h2, h3,h4,h5;
cout<<"masukkan dua bilangan (pisahkan pakai spasi)";
cin>>n1>>n2;
h1=n1+n2;
h2=n1-n2;
h3=n1*n2;
h4=n1/n2;
h5=n1%n2;
cout<<"hasil penjumlahan = "<<h1<<endl;
cout<<"hasil pengurangan = "<<h2<<endl;
cout<<"hasil perkalian = "<<h3<<endl;
cout<<"hasil bulat pembagian = "<<h4<<endl;
cout<<"sisa pembagian = "<<h5<<endl;
return 0;
}
No comments:
Post a Comment