Question: flowchart, and C code for a program that does the following: Asks a user for a number Uses an if statement to determine if the

flowchart, and C code for a program that does the following:

  1. Asks a user for a number
  2. Uses an "if" statement to determine if the number is greater than one. If the number is not greater than one, you must write out an error message.
  3. If the number is greater than 1, the program calculates the square and cube of the number, and displays the output to the user.

Here is what the program looks like when it's executed with a number less than 1 and with a number greater than 1

flowchart, and C code for a program that does the following:Asks a

wember 2010 D Enter a number. 0 You need to enter a number greater than 1. Process exited after 3.318 seconds with return value 42 Press any key to continue RACIS126\\ CIS126 Novem-L -- 3. - evelop "d Exercise 1 Enter a number. 5 The square of 5 is 25. The cube of 5 is 125. Process exited after 3.484 seconds with return value 5 Press any key to continue

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