Question: In C Programming: Instructions Review the videos and notes concerning the if-else construct and comparative operators. Keep in mind, what works in other programming languages

In C Programming:

Instructions

  1. Review the videos and notes concerning the if-else construct and comparative operators. Keep in mind, what works in other programming languages may not work the same way in C.
  2. Write an efficient program, which ask the user for three unique numbers, i.e., none of the numbers are equal to each other, and determines and displays the largest of the three numbers based on the following information:
    • Use appropriate data types and initialize the variables correctly
    • Start by writing and testing a program, which determines the largest of two unique numbers, and then, add nested constructs as needed
    • Thoroughly test your program by using the follow test cases:
      Test Data Expected Results
      1, 2, 3 3
      1, 3, 2 3
      2, 1, 3 3
      2, 3, 1 3
      3, 1, 2 3
      3, 2, 1 3
    • Do NOT use stacked if or if-else constructs, i.e., this problem, like most, should use nested if-else constructs, which usually are more efficient, i.e., stacked if or if-else constructs are usually inefficient, because it is like asking every possible question no matter what, when only a couple of questions may need to be asked to figure out the answer
    • Make sure your output is written professionally, e.g., sentences begin with a capital letter and end with punctuation, words are spelled correctly, there is a space after a colon, there is a blank line between getting the input and displaying the results, which should consist of only one statement, e.g., The largest number is ..., etc.
    • do NOT use logical operators for this one;

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 Databases Questions!