Source Code C++:
#include<iostream.h>
#include<conio.h>
main()
{
int h,b,m,x,y;
cout<<"Masukkan Jumlah Hari = "; cin>>x;
b=x/30;
y=x%30;
m=y/7;
h=y%7;
cout<<"Konversi Hari = "<<b<< " Bulan "<<m<< " Minggu "<<h<< " Hari "<<endl;
getch();
}
Hasilnya:
Senin, 20 Juni 2011
Langganan:
Posting Komentar (Atom)