Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

help asp

Answered: 1 week ago

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago