semoga kalian sehat selalu ya,,,
kali ini saya akan memberikan sedikit yang saya tahu tentang aplikasi menggunakan C++.
langsung simak aja koding nya ya,,,
#include <iostream>
using namespace std;
int main()
{
int x,a,a1,b,b1,c,c1,d,d1,e,e1,f,f1,g,g1,h,h1,i,i1;
cout<< "Masukkan Jumlah Uang Kembalian: ";
cin>>x;
a=x%50000;
a1=x/50000;
cout<< "Lembar Uang 50000 : "<<a1<<endl;
b=a%20000;
b1=a/20000;
cout<< "Lembar Uang 20000 : "<<b1<<endl;
c=b%10000;
c1=b/10000;
cout<< "Lembar Uang 10000 : "<<c1<<endl;
d=c%5000;
d1=c/5000;
cout<< "Lembar Uang 5000 : "<<d1<<endl;
e=d%2000;
e1=d/2000;
cout<< "Lembar Uang 2000 : "<<e1<<endl;
f=e%1000;
f1=e/1000;
cout<< "Lembar Uang 1000 : "<<f1<<endl;
g=f%500;
g1=f/500;
cout<< "Lembar Uang 500 : "<<g1<<endl;
h=g%200;
h1=g/200;
cout<< "Lembar Uang 200 : "<<h1<<endl;
i=h%100;
i1=h/100;
cout<< "Lembar Uang 100 : "<<i1<<endl;
return 0;
}
selamat mencoba guys,,,,
semoga sukses ^_^
0 comments:
Posting Komentar