Question: In programming, pseudocode refers to a type of planning process in which an algorithm or program is described step-by-step using plain language. Pseudocode isn't actual
In programming, pseudocode refers to a type of planning process in which an algorithm or program is described step-by-step using plain language. Pseudocode isn't actual code, but rather a set of instructions that can be replicated to write a specific program with different programming languages.
Write a program in C that follows the pseudocode: 1. Declare variable Var 2. do...while Var is negative or higher than 100 1. Display "Enter a positive integer lower than 100:" 2. Store user input in Var 3. If Var is negative or higher than 100 1. Display "Your input is incorrect."
4. else 1. If Var is equal to 50 1. Display "Perfectly balanced, as all things should be." 2. Else 1. Display "Good job!" 3. Display "The program will end now."
After you are done, answer the following as a comment in your .C code 1. What does this program do? 2. Did you have any difficulties adapting it to C? 3. Why are we using do..while instead of a regular while loop? 4. Write at least one assumption you made that was not specified in the code, as minor as it might be.
Submit the .c file, along with at least one screenshots of your program running with the following inputs: -90 111 50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
