1 #include 2 3 int main() 4{ float y; 7 scanf("%f",&y); 8. 9. switch(y) { 10 11 case 1.1: 12 13 14 printf("good\n"); break; case 1.3: 15 16 17 printf("bad\n"); break; 18 19 return 0; 20 } Referring to the above code, in which line is there a problem? Select one: O a. Line 7 O b. Line 9 O c. There is no problem O d. Line 16

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 19PE
icon
Related questions
Question

c language

Question 8
1#include<stdio.h>
Not yet answered
3 int main()
4{
Marked out of 1.00
P Flag question
float y;
6.
scanf("%f",&y);
8
9.
switch(y)
10
11
case 1.1:
12
printf("good\n");
break;
13
14
case 1.3:
15
printf("bad\n");
break;
16
17
18
}
19
return 0;
20}
Referring to the above code, in which line is there a problem?
Select one:
O a. Line 7
O b. Line 9
O c. There is no problem
O d. Line 16
60°E Smoke
Transcribed Image Text:Question 8 1#include<stdio.h> Not yet answered 3 int main() 4{ Marked out of 1.00 P Flag question float y; 6. scanf("%f",&y); 8 9. switch(y) 10 11 case 1.1: 12 printf("good\n"); break; 13 14 case 1.3: 15 printf("bad\n"); break; 16 17 18 } 19 return 0; 20} Referring to the above code, in which line is there a problem? Select one: O a. Line 7 O b. Line 9 O c. There is no problem O d. Line 16 60°E Smoke
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning