Number of days is taken from user and number of weeks and remaining days are given as output.
Select To use this code as it is.. select and copy paste this code into code.cpp file :)
- #include <iostream.h>
- #include <conio.h>
- void main()
- {
- clrscr();
- int n,d,w;
- cout<<"enter Number of days u have:. ";
- cin>>n;
- //Coding by: Snehil Khanor
- //http://WapCPP.blogspot.com
- w=n/7;
- d=n%7;
- cout<<"No.of weeks= "<<w;
- cout<<"\nno. of days= "<<d;
- getch();
- }
0 comments:
Post a Comment