Question: #include int main ( ) { int num; printf ( Enter an integer: ) ; scanf ( % d , &num

#include
int main(){
int num;
printf("Enter an integer: ");
scanf("%d", &num);
if(num <=0)
printf("This is not a valid input");
switch((num+5)%5+1){
case 7: printf("
The world is flat
");
break;
case 2: printf("
Florida is hot in the summer
");
break;
case 3: printf("
Florida is warm in the winter
");
break;
default: printf("I have never been to Florida
");
}/* end switch */
system("PAUSE");
return 0;
}
a) If the users input to this program is 7 the output will be:
b) If the users input is 3 the output will be:
c) What is the smallest integer that will produce the output: Florida is hot in the summer?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!