Write program which reads n numbers from keyboard

Assignment Help C/C++ Programming
Reference no: EM1388932

Write down C++ program which reads N numbers (positive, negative, integer and double numbers) from keyboard, computes and shows the following information.

a. Count of all negative numbers. If no negative numbers are entered, 0 for count value must be displayed.
b. Sum of all positive numbers. If no positive numbers are entered, 0 for sum value must be displayed.
c. Average of first two negative numbers. If two negative numbers are not entered, 0 for average value must be displayed.
d. Largest number of all numbers entered from keyboard.
e. Reverse order of first two numbers. Reverse order of two numbers 3.2 6.5 is 6.5 3.2.
f. Area (area = pi*r2) using smallest positive number as radius (r) and pi=3.14.
N must be declared as constant in your program and it must be equal to largest digit of your student id number. Suppose N=2, if largest digit of your student id number is less than 2.
The program must contain only main function. User defined functions and arrays must not be used.

Reference no: EM1388932

Questions Cloud

The approximated value of the company''s before-tax marr : What is the approximated value of the company's before-tax MARR? Determine the GDS depreciation amounts in years on through eight.
Who has priority to the collateral : Metro claims that at the time of its loan it was unaware of HFCs interest. Among these parties, who has priority to the collateral? Discuss your answer.
What is the average power developed by the car engine : A car with a mass of 1.50x10^3 kg starts from rest and accelerates to a speed of 18.0 m/s in 12s. Assume that the force of resistance remains constant at 400-N all through this time. What is the average power developed by the car's engine?
Fundamentals of chebyshev theorem : When using the normal distribution (empirical rule) to obtain the bounds for a 99.73 percent of the values in a population, the interval generall will be _________________ the interval obtained for the same percentage if Chebyshev's theorem is ass..
Write program which reads n numbers from keyboard : Write down C++ program which reads N numbers (positive, negative, integer and double numbers) from keyboard, computes and shows the following information. Largest number of all numbers entered from keyboard.
Recognition sequence of the enzyme : A microbiologist found a new restriction endonuclease. When DNA is digested by this enzyme, fragments that average 1,048,500 bp in length are produced.
For legal advice about my liability with respect : For legal advice about my liability with respect to the conduct of my agents in another state. I am trying to find information about relevant
Illustrate what arguments would you use to convince : Many mainstream retailers are still hesitant to post customer reviews. If you were consulting with one of these companies, illustrate what arguments would you use to convince management to try them?
Define the magnitude of the acceleration of the boy : A hiker's trip consists of three segments. Path A is 8-km long heading 60.0 degrees north of east. Path B is 7.0 km long in a direction due east. Path C is 4sa-km long heading 315 degrees counter clockwise from east. Graphically add hiker's displa..

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Computing value of the return statement

In the following code snippet, what is the value of the return statement for x = 4 and n = 4? int foo(int x, int n)

  Represent an instruction supported by simpletron

Implementation contains a Simpletron class and several supporting Instruction classes

  Implement recursive algorithms using a stack

Show the difficulties of the added complexity and which of the two sorts is easier to implement nonrecursively? Why?

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Write c program to add two integers and prints out average

Write a C program that prompts for a variable number of integers, adds them up, and prints out the average. The user will enter either an integer to be averaged.

  Create constructor function which takes no inputs

You must have the constructor function which takes no inputs and randomly generates the 5 letter string for name and random integers from 20 to 40 for both age and class size.

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  You will create a linked list module

You will create a linked list module that exactly meets the specifications given in the supplied header (.h) file. The playlist program must accept a filename on the command line (argv).

  Write c++ programs

Write a C++ program to accept distance in kilometers, coverts it to meters and then displays the result. Write a C++ program to find area and circumference of a circle.

  Distinguish syntax and purpose of while-loop and for-loop

Distinguish the syntax and purpose of while-loop and syntax of a for-loop. Give C++ code examples of both loops and descriibe the main differences.

  Write c program which has parent process and child process

Write a C program that has a parent process, a child process, and a grandchild process. The parent process should print its id and the square or 5.

  To reverse the order of elements on a stack

Write a program in C++ to  reverse the order of elements on a stack S using two additional stacks using one additional stack

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd