Write a program using one while loop

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

Write a program using one while loop that will read in a sequence of integers guaranteed to be within the

inclusive range of 0 through 99,999 from the user. Print out the smallest input, the largest input, the number of

even inputs, and the number of odd inputs. HINT: refer to the code from the in-class handout inputDemo03.cpp

or from the top of page 152 in your text.

Example run (with user input indicated with bold italics):

Enter number or Q to quit: 100

Enter number or Q to quit: 200

Enter number or Q to quit: 300

Enter number or Q to quit: 90001

Enter number or Q to quit: 7

Enter number or Q to quit: 999

Enter number or Q to quit: Q

Largest value: 90001 Smallest value: 7

Even number count: 3 Odd number count: 3

 

 

Reference no: EM13164301

Questions Cloud

State a rubber balloon was inflated with helium gas : A rubber balloon was inflated with helium gas and floated in the air. The next day, the balloon was somewhat smaller and no longer floated.
Calculate w and delta e when one mole is vaporized : calculate w and delta e when one mole of a liquid is vaporized at its boiling point (80 degrees celscius) and 1.00 atm pressure. Delta H vaporization for the liquid is 30.7 kJ/mol at 80 degrees celscius.
Describe the current marketing communication : Describe the current marketing communication, identity, and brand position of Plaza Home Health Services.
State three reasons why spectrophotometric analyses used : Give three reasons why spectrophotometric analyses are performed using a narrow wavelength band centered at ? max. Give the purpose of the following commands:
Write a program using one while loop : Write a program using one while loop that will read in a sequence of integers guaranteed to be within the inclusive range of 0 through 99,999 from the user
Use a solid line to represent the correct calibration line : use a solid line to represent the correct calibration line and a dotted line for the line with the systematic error.) Also discuss the advantages and disadvantages of spectral methods of analysis.
Using an abstract class with only pure virtual functions : Using an abstract class with only pure virtual functions, create three small classes unrelated by inheritance---clases Building, Car and Bicycle. Give each class some uique appropriate attributes and behaviors that it does not have in common with oth..
Explain when calcium chloride dissolves in water : An aqueous solution of sodium chloride contains 4.50g of CaCl2, per liter. What is the molarity of CaCl2? When calcium chloride dissolves in water, the calcium ions
Write a balanced thermochemical equation for the reaction : 1)When CH4(g) reacts with H2O(g) to form H2(g) and CO(g), 206 kJ of energy are absorbed for each mole of CH4(g) that reacts. Write a balanced thermochemical equation for the reaction with an energy term in kJ as part of the equation.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Design a deck plan space ship in eclipse

Develop a simple interactive two-dimensional spaceship deck plan editor using OpenGL and GLUT. Your program will enable a user to create and save a deck plan of a hypothetical spaceship comprising the hull walls.

  Add a sentinel command to stop the loop

add a sentinel command to stop the loop. When the program is compiled, It'll ask the user to type in a palindrome. I want the user to type EXIT to end the loop.

  Design in c a unix utility program gasp

Design in C a Unix utility program gasp. Command gasp [options] STRING FILE... must read listed files (FILE...) and copy each line from input to stdout if it contains STRING.

  Implement a standard sorted linked list class

Write C++ Program:Implement a standard SORTED linked list class. Be sure to include constructor/copy constructor, destructor, and assignment operator overload.

  Define a structure to store marks of a student

Define a structure to store roll no, name and marks of a student - using the structure of Q2. a), above write a 'C' program to create a file "student.dat". There must be one record for every student in the file.

  The first will be a structure called point

Create two structures. The first will be a structure called Point and will have as its data members an x and y coordinate. The second will be called Line and will have two Point structures as its data members.

  Write a program to make the ssds function

Write a program to make the SSDs function as a MM:SS real-time clock. Hint: You must not use a single delay routine for the one second delay because that will not allow for persistence of vision. The displays need to be constantly refreshed during ev..

  Program that will ask for a month

Write a program that will ask for a month (1-12) and a year (yyyy). the program should then produce a calendar showing the month name and year and have all of the days displayed under it.

  Write program function prompt user for number of elements

Write a C++ program main function which will prompt the user for the number of elements called N desired for an array which has the capacity to store 50 elements.

  Write the code

Write a program that allows an instructor to keep a grade book. Each students has scores for exams, homework assignments, and quizzes.

  Write c program to find smallest-largest values

Write a program c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Program to check compatibity for matrix multiplication

Write down program in C++ for matrix multiplication. Program must accept dimension of both matrices to be multiplied and check for compatibity.

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