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

  Create xml document to mark up the nutrition facts

Create XML document to mark up the nutrition facts for a package of Grandma White's cookies. A package of cookies has a serving size of 1 package and the following nutritional value.

  Write non-recursive function-compute n-th fibonacci number

Fibonnacci series 0,1,1,2,3,5,8,13,21,... starts with terms 0 and 1 and has property that each succeeding terms is sum of the two preceding terms. Write the non-recursive function which computes the n'th Fibonacci number.

  Invoke method to tell air conditioner object to turn on

Assume there is a reference variable myAC to an object of this class, which has already been created. Using the reference variable, invoke a method to tell the air conditioner object to turn on.

  Program-inputting data from files-writing-calling functions

This program will give you practice inputting data from files, writing and calling functions, using linked lists and outputting data to a file. You should only use one linked list of structs.

  Use shared mutex for synchronization and locking mechanism

Execute two programs of matrix multiplication with thread programming. Use the shared mutex for synchronization and locking mechanism.

  Program to generate a random number between a range

Write down a program to generate random number between 1 and 100 and asks user to guess what number is.

  Write program to calculate tips for services rendered

Write program to calculate tips for services rendered. The program must request person's occupation, amount of the bill and the percentage tip as input

  Program to accept each worker-s first and last names

A program which continuouly accepts each worker's first and last names, this year's number of units produced, and last year's number of units produced. Show each employee with a message.

  Creating a security policy by gathering information

Suppose mantle of a security consultant. You are asked to visit a client and gather information to develop a security policy for them.

  Create script which checks day of the week

Create a script which checks day of the week, and takes one of two actions (step 2 or 3) depending on the day. If day is Monday through Friday, print (send to stdout) name of the day.

  Define four user-defined exceptions

You will need to define four user-defined exceptions; one for unknown movies, one for unknown member, one for unknown payment method.

  Write program to accept number from user-fibonacci series

Write a program that accepts a number 'n' from the user and generates Fibonacci series till n (Fibonacci series starts with 0 and 1.

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