admin@onlinelearningcenter.in (+91) 7 999 01 02 03

Convert a given number of Days to Years, Weeks & Days

Hardik Patel
12 Posts

Write a program to convert a given number of Days in terms of Years, Weeks & Days

Example

CASE 1

Input:-

days = 209

Output:-

years = 0
weeks = 29
days = 6

CASE 2

Input :-

days = 1000

Output :-

years = 2
weeks = 38
days = 4

CASE 3

Input :-

days = 30

Output :-

years = 0
week = 4
days = 2

CASE 4

Input :-

20

Output :-

years = 0
week = 2
days = 6

 

Published By : Hardik Patel
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

Comments

Jquery Comments Plugin