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

  Program to write variable declarations and function calls

Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts.

  Create the program uses two arrays to hold employee names

Create the program which uses two arrays: one to hold employee names and one to hold employee salaries (standard US currency, two decimal points). The program must prompt user to enter employee names.

  Give greedy algorithm to get all n people across bridge

Give a greedy algorithm to get all these n people across the bridge in a fastest way. Describe the algorithm briefly. Prove the correctness.

  Create a dtd for a small xml data set

Create a DTD for a small XML data set drawn from the Stanford course catalog. There are multiple departments, each with a department chair.

  Program to find area-length and width of a rectangular room

Program is supposed to ask user for length and width ofa rectangular room, and then display room's area. The program should multiply width by length in order to find the area. Find the error.

  Design program to enter a series of numbers

Design a program that asks the user to enter a series of 20 numbers. The program should determine whether the number is valid by comparing it to the following list of valid charge account numbers.

  Computer sales and repair store system

It is required to design a relational database system for a "realistic" application

  Write a program to enter series of numbers

Write a program that ask the user to enter a series of numbers ending with -1. After the -1 is input, program should print how many numbers are even and how many numbers are odd.

  Applying constraints in program

You will require to set up constants in program for given: number of square feet per square yard.

  Create ajax-based product catalog

Create an AJAX-based product catalog which obtains its data from JSON files located on the server. The data should be separated into four JSON files.

  Create the array to determine discount amount

Create the array (DISCOUNT-ARRAY) that will be used to determine discount company will give based on amount of an order.

  Program to prompt a user for hourly pay rate

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

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