Originally Posted by
LAMER_CODER
HEY, i did code it but it didnt work, here's what i have grumpy(are u grumpy all the time)
Code:
printf("\t\t\t\t\t\tOur cities include - \n\t\t\t\t\t\tOttawa\n\t\t\t\t\t\tToronto\n\t\t\t\t\t\tMontreal\n\t\t\t\t\t\tCalgary\n\t\t\t\t\t\tVancouver\n\t\t\t\t\t\tHalifax\n\t\t\t\t\t\tWhitehorse");
printf("Enter city 1: ");
gets(city1);
printf("Enter city 2: ");
gets(city2);[/QUOTE]
gets() is so bad it shouldn't be used. Use fgets(stdin, etc...), instead.
Check out the C Tutorial button at the top of the forum! Lots of good stuff in that tutorial.
No code tags?? C'mon!!