C++ Program – No of Days Years Weeks

by Nideesh C on May 2, 2011 · 0 comments

in C++




//Downloaded From theonlinetutorials.com
//(C)1999.All rights reserved.

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int d,y,w,da;
cout<<"Enter the no of Days"<<endl;
cin>>d;
y=d/365;
w=((y%365)/7);
da=((y%365)%7);
cout<<y<<"Yrs "<<w<<"Weeks"<<da<<"Days";
getch();
}



Not Satisfied ? Just search & get the result

Related Posts Plugin for WordPress, Blogger...
Be Sociable, Share!

Related posts:

  1. c program to convert given number of days to a measure of time given in years, weeks and days. For example 375 days is equal to 1 year 1 week and 3 days
  2. Sample – Program to convert days into years and weeks.
  3. Sample – Program to find the total days in the year till date.
  4. C++ program – Implementation of class
  5. C Program – Implement the midpoint circle drawing algorithm

Leave a Comment

Previous post:

Next post: