Number of Days!

Description:

Write a Program to Convert Days Into Years, Weeks and Days Test Case 1 Input (stdin) 365 Expected Output Years:1 Weeks:0 Days:0 Test Case 2 Input (stdin) 924 Expected Output Years:2 Weeks:27 Days:5

Program :

#include<iostream>

 using namespace std;

int main()

{

int y,d,w;

 cin>>d;

 y=d/365;

 d=d%365;

w=d/7;

 d=d%7;

 cout<<"Years:"<<y<<"\nWeeks:"<<w<<"\nDays:"<<d;

return 0;

 }