Problem

Structured Programming, if Statements. Create a flowchart and a C++ solution...

Structured Programming, if Statements. Create a flowchart and a C++ solution for each of the following problems. For each solution, use only one return 0; statement in main.cpp.

Write a program that prompts the user to enter a number, then prints to standard output the number and a message that states whether the number is less than zero or greater than zero. Sample compilation and runs of the program on a MacBook-Pro are shown below:

MacBook-Pro:Chapter3 jaingber$ g++ Program1.cpp

MacBook-Pro:Chapter3 jaingber$ ./a.out

Enter a value: 9

You entered 9

9 is greater than zero.

MacBook-Pro:Chapter3 jaingber$ ./a.out

Enter a value: −2

You entered -2

-2 is less than zero.

MacBook-Pro:Chapter3 jaingber$ ./a.out

Enter a value 0.5

You entered 0.5

0.5 is greater than zero.

MacBook-Pro:Chapter3 jaingber$ ./a.out

Enter a value 1.602177e-19

You entered 1.60218e-19

1.60218e-19 is greater than zero.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 3
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT