Write program uses while loop to output all odd numbers

Assignment Help Programming Languages
Reference no: EM1358720

Write a program that uses while loop to perform the following steps:

A. Prompt the user to input two integers: firstnum and secondnum. (firstnum must be less than secondnum)
B. Output all the odd numbers between firstnum and secondnum inclusive.
C. Output the sum of all the even numbers between firstnum and secondnum inclusive.
D. Output all the numbers and their squares between firstnum and secondnum inclusive.
E. Output the sum of the squares of all the odd numbers between firstnum and secondnum inclusive.
F. Output all the prime numbers between firstnum and secondnum inclusive.

Reference no: EM1358720

Questions Cloud

Practices that could bring manufacturing back to the u.s : Practices that could bring Manufacturing back to the U.S - Expalin what are some of the operations management practices that can help bring manufacturing back to the U.S?
Determine the value common stock : Scotto Manufacturing is a mature company in the equipment tool component industry. The company's most recent common stock dividend was $2.40 per share.
Employee selection in organizations : Show why employee selection is important for managers. Discuss how to achieve the effective management of people in organizations.
Costs-saving-discount rates and net present value : A salesperson from a different computer company claims that his machine, which costs $85,000 and has an estimated service life of four years, will generate annual savings for the city of $32,000.
Write program uses while loop to output all odd numbers : Write a program that uses while loop to perform the following steps: Output all the odd numbers between firstnum and secondnum inclusive.
Social problems - white collar crime : who believes that street crime is more harmful than white-collar crime, is surprised to find that, compared to every other category of crime, the crime that generates the smallest volume of transfers
Determine effective annual rate of interest : The corporation you work for will deposit $600 at the end of each month in your retirement fund. Interest is compounded monthly. You plan to retire fifteen years from now and estimate that you will need $2000 each month out of the account for the nex..
Find the force on each side of the loop : Find the force on each side of the loop and the torque acting on loop.
Draw a class diagram for one-of-a-kind antiques : Draw a class diagram for the following situation Stillwater Antiques buys and sells one-of-a-kind antiques of all kinds (e.g., furniture, jewelry, china, and clothing).

Reviews

Write a Review

Programming Languages Questions & Answers

  Write the code required to analyse and display

Engineer for a materials manufacturing research lab and have been asked to provide an automated solution to analyse data.

  Use switch statement to display roman numeral version

Use a switch statement to display the Roman numeral version of that number. Input Validation: Do not accept a number less than 1 or greater than 10.

  Create math sorting game using visual basic studio

using visual basic studio 2010, Create math sorting game. Random number between 1 and 99 will be generated and displayed to the user.

  Write statement essential to call compute interest method

Write statement essential to call the calculate interest method with an account balance of $2300.00 and an interest rate of 5%. What rule must be adhered to when calling a method with multiple parameters?

  Write program to display company payroll report in list box

Write a program that display a company payroll report in a list box. the program should read each employees name, hourly rate and hours worked from a file and produce a report.

  Program to keep track of the seat availability of flight

A small airline company needs a program to keep track of the seat availability of its flights. Design the structure type FLIGHT to store a four-digit flight number.

  Draw diagram shows occupancy of buffer as function of time

A transmitter with rate R bps serves the buffer by sending the bits whenever available. Draw a diagram that shows the occupancy of the buffer as a function of time, for different ranges of values for R.

  Explaining law of diminishing returns

As computer word size gets larger and larger, there is a law of diminishing returns; speed of execution of application programs doesn't increase and may, in fact, decrease.

  Program to checks to see if the value of a is valid

Checks to see if the value of a is 0; if it is, the code prints the message "no solution for a=0" and returns from the function.

  Program to prompt a user for hourly pay rate

Create program called "calculatePay" which will prompt user for their hourly pay rate.

  Describing program using suiatble printf command

Yyou have to describe all of this to user using suiatble printf() statements.

  Definition of function quadratic receives double parameters

Write down definition of function named quadratic which receives 3 double parameters a , b , c . If value of a is 0 then function prints the message "no solution for a=0"

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