Pages

Showing posts with label years. Show all posts
Showing posts with label years. Show all posts

Tuesday, February 17, 2015

C Program to Convert given no of days into years weeks and days

#include<iostream.h>
#include<conio.h>

void main()
{
clrscr();
int y,d,w;

cout<<"Enter No. of days:";
cin>>d;

y=d/365;
d=d%365;
w=d/7;
d=d%7;

cout<<"
Years: "<<y<<"
Weeks: "<<w<<"
Days: "<<d;

getch();
}
Read more »