#include<conio.h> #include<iostream.h> #include<stdio.h> main() { //Deklarasi Variable int bil, pembagi, modulus; char lagi; //Input atas: clrscr(); cout<<"==========================================="<<endl; cout<<" Mendapatkan Sisa Hasil Bagi "<<endl; cout<<"==========================================="<<endl; cout<<endl; cout<<"Masukkan Bilangan Yang Dibagi :";cin>>bil; cout<<"Masukkan Bilangan Pembagi :";cin>>pembagi; modulus=bil%pembagi; if(modulus==0) { cout<<"Sisa Hasil Bagi : Tidak ada"; } else { cout<<"Sisa Hasil Bagi : "<<modulus<<endl; } cout<<endl; cout<<"Input Bilangan Lagi [Y|N] ...? ";cin>>lagi; if (lagi=='Y' || lagi=='y') {goto atas;} getch(); }
C++ Program Sisa Hasil Bagi
Posted In
12.1C.07,
BSI,
Logika dan Algoritma,
Semester I
- 4/23/2012 - 0
comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment