//pgm to express given number of days into years,weeks and days
#include<iostream.h>
#include<conio.h>
void main()
{
int n,d,w,y;
clrscr();
cout<<"enter the number of days";
cin>>n;
y=n/365;
w=((n%365)/7);
d=((n%365)%7);
cout<<y<<"years"<<w<<"weeks"<<d<<"days";
getch();
}
Please Click on ADS!!
Please Click on the above ads given by GOOGLE , so that I can maintain my blog!!
Tuesday, August 31, 2010
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment