10/16/2007

4.3 == 請同學練習找出下列程式錯誤之處並修正

*/

#include ;

int main( void ) {
enum day { Sun = 1, Mon, Tue, Wed, Thur, Fri, Sat };
enum day eDay;

eDay = Sunny;
printf("Day %4d is on the weekend\n", eDay);
eDay = Mon;
printf("Day %4d is a work day \n", eDay);
eDay = Tue;
printf("Day %4d" is a work day \n", eDay);
eDay = Wed;
printf("Day %4d is a work day \n", eDay);
eDay = Thur;
printf("Day %4d is a work day \n", eDay);
eDay = Fri;
printf("Day %4d is a work day \n", eDay);
eDay = Sat;
printf("Day %4d is on the weekend\n", eDay");}

0 Comments:

張貼留言

<< Home