every week from monday to friday you go to class. when it is raining, you take an umbrella. but on the weekend,what you do depends on the weather. if it is raining, you stay indoors. otherwise, you have fun outdoors. write a c program to present your weekly program using if/else control statements.
Code: void whatToDo(int day, int raining) { // day: Monday = 1 .. Sunday = 7 // raining: No = 0 , Yes = 1 if (day <= 5) { printf("It's weekday - go to class.\n"); if (raining) { printf("It's raining - take an umbrella.\n"); } else { printf("It's sunny - no umbrella needed.\n"); } } else { printf("It's weekend - you have a free time.\n"); if (raining) { printf("It's raining - stay at home.\n"); } else { printf("It's sunny - have fun outside.\n"); } } }