Time in c program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • robhil
    New Member
    • Mar 2015
    • 1

    Time in c program

    this is part of my code:
    [
    printf("Welcome Mr/Mrs %s!\n",n[23]);
    else if(b==a[24])
    printf("Welcome Mr/Mrs %s!\n",n[24]);
    else
    {
    printf("Unable to identify,please try again!!\n");
    }
    }
    if(b==a[0],b==a[1],b==a[2],b==a[3],b==a[4],b==a[5],b==a[6],b==a[7],b==a[8],b==a[9],b==a[10],b==a[11],b==a[12],b==a[13],b==a[14],b==a[15],b==a[16],b==a[17],b==a[18],b==a[19],b==a[20],b==a[21],b==a[22],b==a[23],b==a[24]);
    {
    printf("PRESS 1 FOR ARRIVAL ATTENDANCE\n");
    printf("PRESS 2 FOR DEPARTURE ATTENDANCE\n");
    printf("PRESS 3 TO EXIT\n");
    scanf("&d",&s);
    if(s==1)
    {
    time_t t;
    time(&t);
    printf("Today's date and time : %s",ctime(&t) );
    getch();
    }
    if(s==2)
    {

    }
    if(s==3)
    {
    printf("");
    }
    ]
    for the time function, it does not return the time. can someone help please.is it because of the if loop? is there a solution?
Working...