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
Elenna [48]
3 years ago
10

Write a C++ program that takes as input a list ( an array) of n integrers and finds the number of negative inetgers inthe list (

array ).
Side Note: The problem did not come out ofthis book but the information that I study is from this book. And Iam not getting how to write the program.
Computers and Technology
1 answer:
telo118 [61]3 years ago
6 0

Answer:Following is the program for the count of negative integers in an array:-

#include <bits/stdc++.h>  

using namespace std;

int main()

{

   int n,count=0;//declaring 2 variables n and count and initializing count with 0..

   cout<<"Enter the size of the array"<<endl;

   cin>>n;//prompting the size of the array...

   int negative_nums[n];//array of integers of size n..

   cout<<"Enter the numbers"<<endl;

   for(int i=0;i<n;i++)

   cin>>negative_nums[i];//prompting elements of the array...

   for(int i=0;i<n;i++)//iterating over the array....

   {

       if(negative_nums[i]<0)// if integer in the array at ith position is negative...  

       count++;// increasing the count...

   }

   cout<<"The number of negative numbers are "<<count<<endl;//printing the count of negative integers...

   return 0;

}

Explanation:

1. In the program i have taken a count integer initializing it with 0

2. Iterating over the array.

3. If the element at ith position is less than zero then increasing the count by 1.

4.Printing the count of negative integers in the array.

You might be interested in
1) Which forms are NOT appropriate to use for affirmations in Full Verbatim?
Oliga [24]

NOT appropriate to use for affirmations in Full Verbatim are :

d) Mm

e) Ammm

f) Aha

Explanation:

  • In verbatim transcription, interviews are transcribed word for word, and sound for sound.  Every um, uh, laugh, and sound must be recorded for posterity.

These are the preferred spellings of typical utterances:

  1. Affirmative: uh-huh, mm-hmm, yeah.
  2. Don't use: um-hum, um-hmm, uh-hum

  • Full verbatim refers to a transcript that includes absolutely everything that is said, exactly how the speakers say it. This means we include all ums, uhs, grammatical and vocabulary mistakes, false starts and repetitions - everything.
  • Verbatim is defined as an exact repetition without changing the words. An example of verbatim is when you quote someone exactly without changing anything.
3 0
3 years ago
Just five types of pointing device,list
posledela

Answer:

five types of pointing devices

Explanation:

Ponting devices

Pointing means point something and the pointing devices are the input /peripheral devices those are used to point the pointer on the screen. We do move cursor on the screen to open the files or any icon.

There are many types of pointing devices but these are quite common which are given below

  1. Computer mouse
  2. Finger on touch screen.
  3. Joystick.
  4. Leap Motion.
  5. Light pen (pen)

1.Mouse

Mouse is most common type of input device that is used for pointing the data on the screen. We press it with our hands and keep pointing the things.

There are three types of mouse

  1. optical mouse
  2. wireless mouse
  3. trackball mouse.

2. Finger on touch screen

In this type of movement the fingers are input devices those we use to see the movement of pointer on the screen and this is most common in this century.

3.Joystick.

Joystick is another input device to point the cursor but it is mostly used in games. Children can use it smartly so it is inculcated in games usually.

4. Leap Motion

The Leap Motion (LM) controller is a latest 3D sensing device for hand posture interaction with a computer. It is having the capability sense the location of the fingers of the hands, as well as the palm position.

5.Light Pen

this is another pointing device which is mostly used to highlight and select the data on the screen.

Note: All of these above pointing devices are most common used now a days. These devices are having new  conventions day by day for the ease of user. This era is basically the era of IT ,so the use of computer must be so easy and conventional for the user so, the innovations and improvement in such devices is made side by side.

3 0
3 years ago
If you increase or decrease the font size of one shape, the font size in other shapes will not be affected. True False
const2013 [10]
When you change the size of an individual shape in a SmartArt graphic, the remaining shapes may adjust their sizes and positions, depending upon the layout of your SmartArt graphic and the amount of available space. In some cases, only the individual shape that you resize will change. In others cases, corresponding shapes will change their size as well.
8 0
3 years ago
You work at a call center of a large bank where you answer credit card services related questions from customers. Lately, you ha
Sati [7]
The awnser is true I think
7 0
3 years ago
Read 2 more answers
Using the =na() function in a cell, makes it clear that data is not _______ and hasn't been ______ accidentally.
inysia [295]
Show the cost to rent different items
5 0
3 years ago
Other questions:
  • 1. When centering one paragraph on a page of text, the user needs to _____.
    15·2 answers
  • Does anyone know this page for drivers ed?
    9·1 answer
  • In order to use an object in a program, its class must be defined.
    9·1 answer
  • How do airbags prevent injury?
    13·1 answer
  • Which statement describes what this command accomplishes when inside and outside interfaces are correctly identified for NAT? ip
    13·1 answer
  • or each array created, the name of the array becomes the name of the pointer constant created by the compiler for the array, and
    6·1 answer
  • Which programming paradigm does the programming language JavaScript follow?
    14·1 answer
  • How did hitles rules in nazi germany exemplify totiltarian rule?
    10·1 answer
  • Write a program to enter 30 integer numbers into an array and display​
    7·2 answers
  • Assignment 1:
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!