Question: 1. Draw a flowchart: switch (score) { case 10 grade = 'A' case 9 grade = 'A' case 8 grade = 'B' case 7 grade
1. Draw a flowchart: switch (score) { case 10 grade = 'A' case 9 grade = 'A' case 8 grade = 'B' case 7 grade = 'C' case 6 grade = 'D' or grade = 'F' } 2. Draw a flowchart: switch (score) { case 10 case 9 grade = 'A' case 8 grade = 'B' case 7 grade = 'C' case 6 grade = 'D' or grade = 'F' } Print grade 3. Draw a flowchart: if (average >= 60) if(average < 70) print "Passing but marginal" else print "Failing" 4. Draw a flowchart: switch(grade) { case 'a' case 'A' print "Excellent work" case 'b' case 'B' print "Good work" case 'c' case 'C' print "Average work" case 'd' case 'D' print "Poor work" case 'f' case 'F' print "Change your major!" ; } 5. Draw a flowchart: if (Age >= 17) print You can go to an R movie alone. elseif (Age >= 13) print You can go to a PG-13 movie alone. elseif (Age >= 5) print You can go to a G or PG movie alone. else print "Uh. You're too young to see a movie" 6. Draw a flowchart: a. x = 1, y = 0 if (x > 0 AND y < 0) x = y = 23; print x, y b. x = 1, y = 0 if (x > 0 OR y < 0) x = y = 23 print x , y x = 10; y = 40 if (x >= 10) if (y < 40) y++ else y print x , y 7. Draw a flowchart: if tax < 6% then print (you must pay $8) elseif tax<8% then print (you must pay $10) elseif discount<10% then print (you must pay $15)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
