Quiz2

Quiz2 - /* MAE 9: Quiz #2, Fall 2006 Due on Friday, October...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* MAE 9: Quiz #2, Fall 2006 Due on Friday, October 20, before 9:00 pm During the quiz, you are not allowed to exchange information or files related to the test problems with others. Use the program skeleton below starting with #include <stdio.h> as the starting point. Add the necessary code to the switch cases. In case 1 for the switch (a) print a blank line, a line with the message:"Part I:" and a blank line. (b) print the first message: "Let's practice integer multiplications five times." In a for-loop print: "Enter a * b = c: " Use scanf() to get the values of a, '*', b, '=', and c. (c) Use if/else to check the result, if the value in c is correct, print "Correct, you have earned 20 points." If the value in c is not correct, print: "No, . ..." to inform the correct value. (d) At the end of the loop, print the score saying that "Your score is ??/100." where ?? indicates the score. (e) If the score is 100, then after a blank line print "You are wonderful!". In case 2 for the switch
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/22/2008 for the course MAE 9 taught by Professor Lubarda during the Fall '07 term at UCSD.

Page1 / 3

Quiz2 - /* MAE 9: Quiz #2, Fall 2006 Due on Friday, October...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online