1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sergio [31]
3 years ago
10

Write a program that prompts the user to input a number. The program should then output the number and a message saying whether

the number is positive, negative, or zero.
Computers and Technology
1 answer:
Gala2k [10]3 years ago
7 0

Answer:

Following is the program in C++ Language

#include <iostream> // header file

using namespace std; // namespace std

int main() // main method

{

   int n;  // variable declaration

   cout<<" Please enter the number :";

   cin>>n; // Read the number

   if(n>0) // check the condition when number is positive

   {

cout<<n<<endl<<"The number is Positive"; // Display number

   }

  else if(n<0) // check the condition when number is Negative

  {

cout<<n<<endl<<"The number is Negative";// Display number

  }

  else // check the condition when number is Zero

  {

cout<<n<<endl<<"The number is Zero";// Display number

  }

   return 0;

  }

Output:

Please enter the number:

64

The number is Positive

Explanation:

Following are the description of the program

  • Declared a variable "n" of int type.
  • Read the value of "n" by user.
  • Check the condition of positive number by using if block statement .If n>0 it print the number is positive.
  • Check the condition of negative number by using else if block statement If n<0 it print the number is negative.
  • Finally if both the above condition is fail it print the message " The number is Zero"

You might be interested in
The next four octal numbers after 36 is:________.
Papessa [141]

Answer: b. 37, 40, 41, 42

Explanation:

The next four octal numbers after 36 is 37, 40, 41, 42.

The octal numeral system, which is also referred to as "oct" for short, is simply base-8 number system.

It is a number system whereby only digits from 0 to 7 are used and there are no letters or numbers that are above 8 that are used.

In this case, after 36, the next number will be 37 after which we go to 40 as we can't write 38 in the octal system. Therefore, the next four octal numbers after 36 is 37, 40, 41, 42.

7 0
3 years ago
What lets you do many things, like write book reports and stories?
Marina CMI [18]
A -
Application programs
8 0
2 years ago
Read 2 more answers
How many binary digits are in 10^100.
Basile [38]

Answer:

333 binary digits.

Explanation:

8 0
2 years ago
Which is one is bigger 326 kb or 60,436 kb?
Nitella [24]

60,436 is larger.

A byte is a sequence of 8 bits (enough to represent one alphanumeric character) processed as a single unit of information. A single letter or character would use one byte of memory (8 bits), two characters would use two bytes (16 bits).

7 0
3 years ago
Read 2 more answers
In a(n) _____, the web becomes an integral part of the application, rather than just a communication channel, and systems analys
IRISSAK [1]

In an <u>Internet-based system</u>, the web becomes an integral part of the application, rather than just a communication channel, and systems analysts need new application development tools and solutions to handle the new systems.

d) Internet-based system

<u>Explanation:</u>

Web information system, or web-based information system, is a data framework that utilizes Internet web advancements to convey data and administrations, to clients or other data frameworks/applications.

It is a product framework whose primary intention is to distribute and keep up information by utilizing hypertext-based standards. In an Internet-based system, the Web turns into a fundamental piece of the application, instead of only a correspondence channel, and frameworks investigators need new application advancement instruments and solutions to handle the new systems.

7 0
2 years ago
Other questions:
  • Jason works as a financial investment advisor. He collects financial data from clients, processes the data online to calculate t
    9·1 answer
  • Generally speaking, mobile sites are good for acquiring new customers and inspiring new relationships while mobile apps are good
    6·1 answer
  • On hearing my name, you may think that I am iterative, but I play a vital role in networking by boosting the signal strength to
    13·1 answer
  • On the first line, place your name in a comment. Create a program that does the following: Take in three integer numbers from th
    5·1 answer
  • Rate is how fast a screen updates the information being displayed.
    6·2 answers
  • HELP 10 POINTS AND BRAINLIEST FOR BEST ANSWER! EASY I PROMISE! HELPFUL ANSWERS ONLY PLEASE HURRY!
    14·2 answers
  • Write out the base sequence that is added directly after the primer. In order for Moodle to correctly grade this question, write
    11·1 answer
  • The process of giving the user the result of processing is called
    14·1 answer
  • What is an operating system that controls some aspects of the computer?
    10·2 answers
  • How can random numbers in a range be generated in Java?.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!