help me pleaseeee.....

i need to show, the result like this...
------------------------------
example :
insert date 7/5/2000
insert date 1/3/1999
insert date 12/2/2003
the earliest date is 1/3/1999
-----------------------------

// this is my coding please correct... someone help...
#include <stdio.h>
#include <conio.h>
#define x 20

int main() {
int dd[x],mm[x],yy[x],i,n,b,c,d,q,w,e;
b=0; c=0; d=0;
do {
for(i=1; i<=100; i++)
{
printf("insert date dd/mm/yy ");
scanf("%d/%d/%d",&dd[i],&mm[i],&yy[i]);
q=dd[i]; w=mm[i]; e=yy[i];
if(q==0 || w==0 || e==0)
{
goto hitung;
}
if(e<d)
{
b=q; c=w; d=e;
}
if(w<c)
{
b=q; c=w; d=e;
}
if(b<q)
{
b=q; c=w; d=e;
}
}
}
while(b!=0 && c!=0 && d!=0);
hitung:
printf("earlier date is : %d/%d/%d \n",b,c,d);

getch();
}
Awesome variable names. You should fix them.
Don't use #define. Or when you do, do not use lowercase macro names.
Don't use goto. Don't use printf/scanf in a C++ program.
closed account (zb0S216C)
Duplicate: http://www.cplusplus.com/forum/beginner/52493/#msg284708

Wazzak
Topic archived. No new replies allowed.