Write program which uses while loops to input two integers

Assignment Help Programming Languages
Reference no: EM1372529

Q1) Write a program that uses a while loops 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.
c) Output the sum of all even numbers between firstNum and secondNum.
d) Output all the numbers and their squares between 1 and 10.
e) Output the sum of the squares of all the odd numbers between firstNum and secondNum.
f) Output all the uppercase letters

Reference no: EM1372529

Questions Cloud

Purpose of need statement : What is the purpose of a need statement? What should it contain? What are some of the key factors that would help to determine whether or not an organization is ready to seek funding?
Calculation of breakeven units : Jesse, Corporation, located in Mesa, Arizona, manufactures high-end baby chairs. The company's cost accountant, Lisa, has been assigned through the CEO to determine how many baby chairs Jesse, needs to make and sell in order to break even.
What is the cheetahs kinetic energy : Through a hard sneeze, your eyes might shut for 0.70s. If you are driving a car at 100 km/h during such a sneeze, how far does the car move for the duration of that time.
Cultural and linguistic ties : Explain what you feel is the historic importance of China and India to the rest of Asia, and how that significance is reflected today. Are there cultural and linguistic ties between Asian countries?
Write program which uses while loops to input two integers : Write the program which uses while loops to perform the following steps: prompt the user to input two integers: firstNum and secondNum.(firstNum must be less than secondNum.
Changing patterns of social mobility in us : Assume you have the opportunity to do research on changing patterns of social mobility in the U.S. What specific question would you want to investigate
Question about break even : Administrators at a university are considering to offer a summer seminar. It costs $3000 to reserve a room, hire an instructor, and bring in the machine.
How might managers use this information : Suppose that macroeconomics forecasters predict that economy will be expanding in near future. How might managers use this information.
Explain using a diagram how a tax cut in period two affects : Explain using a diagram how a tax cut in period two affects consumption in both periods. Assume that average consumer does not believe that he/she or anyone in family will ever have to pay higher taxes in future to offset current cuts.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program using array to show fifo queue

Write program using any language which uses the array to demonstrate simple FIFO queue with 10 job entering the queue and 5 jobs removed from the queue by the server.

  Write program to accept a list of student-s name

Write a program that will accepts a list of student's name, individual scores for quiz1, quiz2 and quiz3. Your program should then compute for the average of 3 quizzes.

  Program prompt teacher to input student number

The program must prompt teacher to input student number. Quiz score for that student will be displayed. Program can prompt for each quiz score.

  Benefits of validating the forms

When you are collecting data, you need to consider what data to collect, why you are collecting the data. What are other benefits of validating your forms? How are forms validated? What are some form validation best practices?

  Create derived class by inheriting tthe class

Create a derived class named FancyDateClass by inheriting the DateClass. You will have to provide both the class definition and implementation.

  What is the break -even point for upgrades

What is break -even point for the upgrades? that is , what price would we require to charge for CPU (or disk -change only one) so result was the same cost per 1% increase for both?

  Design program that asks user to enter budgeted amount

"Design a program that asks the user to enter the amount that he or she has budgeted for a month. (For example: $2,000.00)

  Create set-list of enumerated constants called week

Create set/list of enumerated constants called week which contains days of week. Have variable called today that is of kind week. Allot a value to today.

  Explaining graphics as user experience on web sites

Graphics provide significant richness to the user experience on web sites. Discuss how each of these sites uses graphics in good or poor ways.

  Program to allot new value to first element of array

Write the single statement which assigns new value to first element of array. This new value must be equal to twice value stored in the last element of the array.

  Program instantiates four dates and allots invalid values

Demonstration program instantiates four Dates and purposely allots invalid values to some of arguments; class methods will correct invalid values.

  Write if statement to display acceptance messag

Write an if statement that displays an acceptance message for an astronaut candidate if the person's weight is between the values of opt_min.

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