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

  Prepare a program that uses the pthread library

Prepare a C/C++ program that uses the PTHREAD library to create threads and mutexes to synchronize them.

  Give students practice in writing and calling their function

To give students practice in writing and calling their own functions. To give students practice in implementing and planning complex programs.

  Use structures to create c program to compute student record

Explain the following and give their suitable syntax. A pointer. Use structures to create C program to compute and store student records of class.

  Prepare a businesspartner

Prepare a BusinessPartner class that contains a company name, first name and a telephone number.

  Program to enter number of values to be processed

Write c++ statements to permit the user to enter n, the number of values to be processed; then assign the anonymous array of n double values, storing its address in doublPtr.

  Design for storing the maze layout

Design and implement a C++ program for maze layout

  Write program to count occurrences of each word in text

Write down C++ program to read following text. Count occurrences of each word in text and keep this count in list of elements containing (word, occurrence count) pairs.

  How nested if-statements replace with one if-statement

Describe how following nested If-statements could be replaced with one if-statement using logical operator (And/Or/Not). Write down the C++ code example.

  Implement a semantic analysis

The program will implement Semantic Analysis. The assignment provides two options to define variable scope, either using the Global Option or the Local Option.

  Operating system and cpu scheduling

Operating System and CPU Scheduling

  A hierarchical jpeg encode decoder for greyscale images

This project is to develop a program that implements a hierarchical JPEG encoder/decoder for greyscale images.

  Program which asks the user for due date of next assignment

Write a program which asks the user for due date of the next assignment (hours, minutes). Then print number of minutes between the current time and the due date in format.

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