Originally Posted by rothj0hn
Code:
#include<stdio.h>
#include<conio.h> // nonstandard header
main() // main returns int should be int main()
{
char month[12];
clrscr() // ??
printf("input month:");
scanf("%s",&month); // no & month is a pointer already
if (month=="january") // cannot compare char arrays this way use strcmp()
printf("new year"0; // missing ')'
else if (month="december"); // like above
printf("xmas");
else
printf("ordinary month")
getch(); // nonstandard
return(0);
}
it only prints error!!! y?