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
Which kind of a person will you be if you prove to be accountable for your actions?
Black_prince [1.1K]

Answer: You would be a person of integrity.

Explanation: Look up Integrity for details.

3 0
3 years ago
A customer has a new laptop with wireless WAN capabilities; however, the software does not connect to the Internet. What would y
LUCKY_DIMON [66]

Answer:

Check below for the explanation

Explanation:

The following suggestions will be given to the customers:

  • Go to network settings and check the WIFI settings to confirm whether the WIFI connection is on. Switch the WIFI to the on position if it is off.
  • The customer should check if the wireless driver is installed on the computer, if the driver is not installed, he should try to install it
  • The customer should check all the available access points and confirm if their signal strengths are strong enough to allow for any connections. Restart the access point to enhance proper connection.
  • Check to see if your operating system is updated to support your internet connection. You can update your operating system to the latest version
  • Run a Network Diagnostics on your computer. This will run a couple of tests to see what’s possibly causing your Wi-Fi issues.
5 0
3 years ago
TRUE OR FALSE!!!!!
VladimirAG [237]
The answer is True.
6 0
3 years ago
Read 2 more answers
Meaning of fetch cycle​
kherson [118]

Answer:

The instruction cycle (also known as the fetch–decode–execute cycle, or simply the fetch-execute cycle) is the cycle that the central processing unit (CPU) follows from boot-up until the computer has shut down in order to process instructions.

Explanation:

7 0
3 years ago
A triangle is an example of __________ .
inna [77]
 CONVEX polygon. 
An equilateral triangle is a triangle that has the same side length and same angles.

It is identified as a convex polygon because it does not have a reflex angle. 
A reflex angle is an angle that is greater than 180° but lesser than 360°. Interior angles of a triangle sum up to 180°.
7 0
3 years ago
Other questions:
  • 5. Are you more honest in your online communication? Explain your response.
    6·1 answer
  • Which view In a presentation program displays you’re slides in full screen modes ?
    8·2 answers
  • Designing, producing, exhibiting, performing, writing, and publishing multimedia content including visual and performing arts an
    6·1 answer
  • What is not a common purpose for a research report?
    5·2 answers
  • In the code segment below, assume that the int variable n has been properly declared and initialized. The code segment is intend
    5·1 answer
  • A _________ is a task at the lowest level of the WBS that represents the level of work that the project manager uses to monitor
    5·1 answer
  • __________ is a growing practice in cooperative farmingassociations to pool and sell the fruit as a common commodity underthe br
    6·1 answer
  • Briefly explain specialisation?​
    11·1 answer
  • Which of the following keywords allows a subclass to access a superclass method even when the subclass has overridden the superc
    9·1 answer
  • What command utilizes the limpel-ziv (lz77) compression algorithm and achieves a compression ratio of 60-70 percent?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!