How do I write a C program to convert specified days into years, weeks, and days?

write a C program to convert specified days into years, weeks, and days

What is C : C is a general purpose programming language developed in 1972 by Dennis M. Ritchie at the Bell Laboratories to develop the UNIX operating system.  C is most widely used computer programming language.


STEPS :-

  1. Take a number of days from the user.
  2. If you want to convert these number of days into year. then divide this number by 365 and obtain only quotient.
  3. now convert these number into weeks , then divide the number of days with 365 and takes only remainder and also divide remaining remainder value by 7 and obtain quotient.
  4. now last step is converted into days. for the number of days divide by 365 and obtain the remainder . further divide these remainder by 7 and obtain remainder.

Let’s See an example of it :-

                                 


Comments

Popular posts from this blog

proassignment help backlink data index 41

Programming shark backlink data index 67

programming shark backink data index 31