here is my updated code:
Code:
#include<stdio.h>
int main(void)
{
int month, day;
char h1, h2, h3, h4, h5;
char v1, v2, v3, v4, v5;
printf("\nEnter home team: ");
scanf("%c%c", &h1, &h2);
printf("Enter visitor: ");
scanf("%c%c%c%c%c", &v1, &v2, &v3, &v4, &v5);
printf("Enter game date (mm/dd): ");
scanf("%d/%d", &month, &day);
printf("\nHome\t \tVisitor\t \tDate");
printf("\n----\t \t-------\t \t----");
printf("\n%c%c \t vs\t%c%c%c%c%c\t on\t%d/%d/2008\n\n", h1, h2, v1, v2, v3, v4, v5, month, day);
return(0);
}
here is my output:
Enter home team: UF
Enter visitor: Miami
Enter game date (mm/dd):
Home Visitor Date
---- ------- ----
UF vs
Miam on 0/0/2008
(well that's sort of the output, the dashed lines are lined us with visitor and date), it's just the way copy and pasted worked through my mac terminal window.
When I complete Miami, it skips the enter game date, and formats it. Even though it seems to me that I have the formatting uniform, it outputs like a mess. Can someone help me straighten it out???
Thanks