Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I tried writing a program on C++ that will allows the user to set one input and let him know if the number is either

I tried writing a program on C++ that will allows the user to set one input and let him know if the number is either positive or negative or equal to zero or output simply your number is not an integer. When I ran my codes, if I input either a positive or negative number, it worked perfectly but when I input either 0 or any floating point or characters, I received the same output which is "the number is equal to zero" while the computer should displays instead "your number is not an integer." for any other characters different from an integer.

Where did I go wrongly, that is what I am wondering!

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

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago