Pages

Subscribe:

C Program : Convert Number Into Year , Month And Date

This C Program convert an integer number into Year , Month and Date.

Program :


#include<stdio.h>
#include<conio.h>
void main()
{
    char ch;
    do{
        long int n,y,m,d;
        clrscr();
        printf("\n\t Enter no convert into Year , Monthe and Date:");
        scanf("%d",&n);
        y=n/365;
        n=n%365;
        m=n/30;
        d=n%30;
        printf("\n\t<%d> year <%d>month <%d> date\n",y,m,d);
        printf("\n \t Enter continue(y/n):");
    ch=getch();
    }while(ch=='y'||ch=='Y');

}


Output :


No Preview






If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
                                                           AND

 If you like this article , like our Facebook like page and click  +1 to support 123techguide
comments powered by Disqus
 

Listed In

Bloggers - Meet Millions of Bloggers http://Link-exchange.comxa.com
Blog Search: The Source for Blogs Internet Blogs

Disclaimer

The contents in this blog are taken from various sources available over the internet, therefore we do not gurantee of it's accuracy, if you find any of the content in the blog is infringing it's copyright, please do email us on '123techguide@gmail.com' and we will make sure to remove the same from the blog at the earliest.