#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv) {
int x,a,b,c,d;
cout<<"masukan nilai x :";cin>>x;
a=x/100;
b=x%100;
c=b/10;
d=b%10;
cout<<a<<"ratusan"<<endl;
cout<<b<<"puluhan"<<endl;
cout<<c<<"satuan"<<endl;
return 0;
}
Tidak ada komentar:
Posting Komentar