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
Kruka [31]
4 years ago
14

Write a program to read 6 numbers and display the following counts: NPos: the number of posi;ve ones NNeg: the number of nega;ve

ones NZero: the number of null ones
Computers and Technology
1 answer:
STALIN [3.7K]4 years ago
4 0

Here you go. The program will count entered zeros. Null is not happening here...

int main()

{

int NNeg = 0;

int NPos = 0;

int NZero = 0;

   std::cout << "Enter 6 numbers:\n";  

for (int i = 0; i < 6; i++) {

 double number;

 std::cin >> number;

 if (number < 0.0) NNeg++;

 else if (number > 0.0) NPos++;

 else NZero++;

}

std::cout << "You entered:\n";

std::cout << NNeg << " negative numbers\n";

std::cout << NZero << " times zero\n";

std::cout << NPos << " positive numbers\n";

}

You might be interested in
FTP is commonly used to __________ and __________ files to a server.
Aleks [24]

Answer:

upload; download

Explanation:

FTP (File Transfer Protocol) is an internet protocol used to upload and download a file to a server, there are some programs help us to transfer this data to a server, in some cases, we're going to need these programs to upload website files to the server like images or videos, or some websites where do you need a user and passwords to upload file by FTP

8 0
4 years ago
2. Sometimes, validating the HTML code for a web page will help you debug an application, because a. the page won’t run in a bro
aleksandrvk [35]

Answer:

Option c. you can be sure that a validated page will work correctly in a browser

Explanation:

A faulty HTML codes can result in various types of unexpected error when running the web page in different platforms or browsers. This will cause an inconsistent style or layout. HTML code validation can check if the code adopt the standard tag and structure. A validated HTML code can guarantee a web application running smoothly in different browsers and always present consistent web page layout to users. HTML code validation has become part of the standard workflow before a web page go live in internet.

4 0
3 years ago
Warning or pop-up that convinces a user that his or her computer or mobile device is infected with a virus or other problem that
o-na [289]
Idk... just dont trust those pop-ups unless your device is acting weird.
3 0
3 years ago
Which is a potential disadvantage of emerging technologies? A. increased spread of misinformation due to advanced communication
Sergio039 [100]

Answer: I believe it’s D.

Explanation: Less developed countries may not be able to afford the new technology, while more developed ones will be able to do so. Meaning the less developed countries will most likely not change.

8 0
3 years ago
The ________ of a cpu dictates how many instructions the cpu can process each second.
makkiz [27]
Gigahertz is the correct answer I believe.
My processor is a i5-6600k with 3.5ghz so assuming GHz is the speed I believe it would be gigahertz
3 0
4 years ago
Other questions:
  • What language used orthogonality as a primary design criterion?
    8·1 answer
  • What is the term used to describe data sets are so large and complex that they become difficult to process using traditional dat
    12·1 answer
  • Which one of the following is not possible to view in the debug logs?
    8·1 answer
  • What can you do to manually exclude an individual from a recipient list?
    6·1 answer
  • Which property is assigned to a file by the operating system?
    13·1 answer
  • Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ name
    9·1 answer
  • When pointed over a text within a paragraph, the cursor takes the shape of a/an
    10·1 answer
  • What is the best food to eat before workout? why?​
    10·2 answers
  • 1. Using a microphone to create an audio file to accompany a message is an example of how data is processed and sent to an outpu
    9·1 answer
  • I need help on this, need answer asap.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!