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 a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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