Make a program to prints out the even integers

Assignment Help Computer Engineering
Reference no: EM132196182

Write a c++ program that does the following-

a) prints out the even integers between 2 and 100.

b) prints out the integers that are multiples of 3 from 99 down to 3.

c) prints out the integers between 2 and 1,048,576 (2^(20)) that are integer powers of 2.

d) prints out the integers between 1,048,576 down to 2 that are integer powers of 2.

*In the program, use a for, do-while, and while loop at leat once (one loop per operation)

*program is written in only one "int main" function, not sepate functions

*for each of the 4 operations in the program, include a counter variable inside the respective loop that counts how many numbers are printed out. Report that result as well.

*The results for operations a and b should be printed out with 10 integers per line, right justified in a 5 byte field.for example-

2 4 6 8 10 12 14 16 18 20

22 24 26 28 30 32 34 36 38 40

Reference no: EM132196182

Questions Cloud

Write a c program that detects and reports on areas : You should preprocess your data to eliminate noise in following manner: for every negative value you encounter, average the (maximum of) 8 squares around it.
Write a c program to find the count of words : Write a C program to find the count of words and optionally the longest and or shortest words in a string input by the user or coming from a file.
Explain washington legacy to independence : Analyze the reasons why Congress selected Washington as commander-in-chief. Explain Washington's legacy to independence.
Write a c program that fills a two dimensional array element : Write a C program that fills a two dimensional array element with the character 'O' (capital Oh) when the sum of the row and column index.
Make a program to prints out the even integers : Write a c++ program that prints out the even integers between 2 and 100.
Review given problem on health care professionals : Meaningful use was designed through standards governing the manner in which health care records are utilized by health care professionals.
Write a function that takes two dates in the structure : In writing the days function, use the convention that all years have 360 days and each month consist of 30 days.
Construct three to four paragraphs using given information : You will construct three to four paragraphs comprised of five to seven sentences each. Each paragraph should be between 150-200 words.
Emulate a simple clock that shows current time on the host : Write a C program to emulate a simple clock that shows current time on the host' s display through the TeraTerm Emulator.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Discuss the relationship between data and information

Discuss the relationship between data, information, and knowledge. Support your discussion with at least 3 academically reviewed articles.

  What kinds of documents are poor matches

What kinds of documents are poor matches

  What type of addess is used to forward the datagram

What type of addess (physical, MAC, port address or some other) is used to forward the datagram from the source computer .

  Discuss their main applicability as well as their advantages

Autonomous (intelligent) software agents are used in Artificial Intelligence to solve an increasing number of complex problems.

  Create a textsquare function using the same techniques

Create a textsquare function using the same techniques as the pyramid function. The function will take in two values as input: the character to use in making.

  Discuss the terms front-end and back-end of an application

discuss, in your own words, the terms front-end and back-end of an application. What role do procedures and functions play when designing and implementing front-end and back-end systems?

  Write a program to implement dynamic motion specifications

Write a program to implement dynamic motion specifications. Specify a scene with two or more objects. initial motion parameters, and specified forces.

  Discuss strategies to ensure integrated error messages

Error messages are a key part of an overall interface design strategy of guidance for the user. Discuss strategies to ensure integrated.

  Define a notion of a value of control

In the same spirit, define a notion of a value of control, which is the gain to agent if she is allowed to intervene at a chance variable X and set its value.

  Write a gui-based program that manages an auction

Write a GUI-based program that manages an auction of several items.

  How would you analyze whether a coin is fair

Tossing a coin ten times resulted in eight heads and two tails. How would you analyze whether a coin is fair? What is the p-value?

  Modify java application that displays the product number

make a Java application that displays the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit).

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