Powered By Blogger

Monday, May 4, 2009

C Programming

#include
#include
void main()
{
int a,b,c,d,e,f,g,h,i;
char s,t,u,v;
clrscr();
printf("Enter first date :");
scanf("%2d %c %2d %c %4d",&a,&s,&b,&t,&c);
printf("Enter second date :");
scanf("%2d %c %2d %c %4d",&d,&u,&e,&v,&f);
if(d>a)
{
a=a+30;
b=b-1;
}
if(e>b)
{
b=b+12;
c=c-1;
}
g=a-d;
h=b-e;
i=c-f;
printf("\n%2d %c %2d %c %4d",a,s,b,t,c);
printf("\n%2d %c %2d %c %4d",d,u,e,v,f);
printf("\n\n%2d %c %2d %c %4d",g,s,h,v,i);
getch();
}

0 comments:

About This Blog

This is an important blog about updated news about computer science and technology.

Blog Archive

Visitors

  © Free Blogger Templates Blogger Theme II by Ourblogtemplates.com 2008

Back to TOP