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

  Questionassume that a risc machine uses five register

questionassume that a risc machine uses five register windows.a how deep can process calls go before registers must be

  Examples of polyfunctional compounds

Examples of polyfunctional compounds

  Add the code to control the loop

Add the code to control the loop. You may use either a while loop or a do...while loop.

  In the united states there are hundreds of federal and

in the united states there are hundreds of federal and state government agencies that regulate different functions of

  What kinds of security problems computer services encounter

What kinds of security problems might computer services encounter with a system such as this?

  Write a function named filteronmax that takes a queue

Write a function named filterOnMax that takes a queue of integers and an integer value named max as parameters and returns a new queue of integers that contains only the values in the original queue that are less than or equal to the value of max.

  Write the decryption algorithm in pseudo code for cbc mode

Write the decryption algorithm in pseudo code for ECB mode. Write the decryption algorithm in pseudo code for CBC mode.

  How does one evaluate types of tracking beacon variable pass

How does one evaluate the types of tracking beacon variables passed to the analytics platform collection servers? How do tracking beacon audits help ensure reliable data collection?

  Which of the following statements are true

Suppose that the last RTT sample at host A is 10 msec. The current value of the RTT estimate must be greater than or equal to 10 msec.

  Write a shell script instead of a shell function

When might it be necessary or advisable to write a shell script instead of a shell function? Give as many reasons as you can think of.

  Perform the necessary tasks using rapidminer

Perform the necessary tasks using RapidMiner, answer the questions below and prepare the required screenshots. This assignment will be completed in teams.

  Explain the distinction between a lut and a clb

Explain the distinction between a LUT and a CLB within the FPGA reconfigurable fabric. What is an advantage of a strategy to increase reliability.

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