Kalkulator Sederhana
Membuat program kalkulator sederhana
Listing Program:
Hasil Program:
Listing Program:
#include<iostream.h> main() { float x, y; cout<< "Masukkan nilai x: "; cin>>x; cout<<"Masukkan nilai y: "; cin>>y; cout<< "==================== "<<endl; cout<< "Hasil penjumlahan antara "<<x<<" dan "<<y<<" = "<<x+y<<endl; cout<< "Hasil perkalian antara "<<x<<" dan "<<y<<" = "<<x*y<<endl; cout<< "Hasil pembagian antara "<<x<<" dan "<<y<<" = "<<x/y<<endl; }
Hasil Program:
Tidak ada komentar