Write program using while loop to output squares of integers

Assignment Help Programming Languages
Reference no: EM1362640

Q1) 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: EM1362640

Questions Cloud

Calculate the abnormal return behavior : Aerotech, an aerospace-technology research Corporation, announced this morning that it has hired the world's most knowledgeable and prolific space researchers.
Determining projected ending retained earning balance : What is the projected ending retained earning balance of march 31, 2012, assuming that 2010 was their worst year of business?
Nutritional needs at an infant stage : What are the nutritional needs at an infant stage in life?
Allocate resources to high-return activities : The extent to which an organization has a coherent form for dividing labor, allocating responsibilities, coordinating tasks, and ensuring accountability.
Write program using while loop to output squares of integers : Write a program that uses while loop to perform the following steps:Output the sum of all the even numbers between firstnum and secondnum inclusive. Output all the numbers and their squares between firstnum and secondnum inclusive.
Compute implicit cost of demand deposits : A financial intermediation has estimated the following annual costs for its demand deposits: management expenses per account = $140, average account size = $1,500,
Plantwide versus department overhead rates : Suppose that instead of using a plantwide overhead rate, the company had used a separate predetermined overhead rate in each department. Under these conditions:
Address a rude and unprofessional instructor : Explain what is forward integration as it relates to strategic management and what are the advantages and disadvantages of it?
The market semi strong form efficient : Investors expect a corporation to announce a 10% increase in earnings, but instead the firm announces a 1% increase. If the market is semistrong-form efficient,

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