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

  Describe the methods to mitigate the vulnerabilities

Describe the methods to mitigate the vulnerabilities, as they relate to the seven domains. Describe the impact and the vulnerability of the SCADA.

  Select which currency they wish to display

Expand the "Currency Conversion" program to have a menu of five currencies that allows the user to choose which currency they wish to show in its equivalency to the US dollars.

  Develop a program to implement the scan-line algorithm

Develop a program to implement the scan-line algorithm for displaying the visible surfaces of a given polyhedron.

  Determine how would you eliminate the problem

Would SQL queries lead to performance bottlenecks in an Oracle Database and how would you eliminate this problem?

  What is the purpose of MPLS

Is UDP the same thing as TCP? Explain. What is the purpose of MPLS? What is the relationship between IP and ICMP? Is DHCP the same thing as NAT? Explain.

  Write a function to input a sound then create a canvas sound

Write a function to input a sound, then create a canvas sound of the same length. Copy samples from the input into the canvas every third position.

  Addressing the ethical issues

She asks you, company's Chief Information Security Officer, for your opinion. Provide your advice whether you agree or disagree along with the CEO, specifically addressing the ethical issues included.

  What is the definition of the term baud rate

What does it mean when a signal is self-clocking? What is the definition of the term baud rate? How does baud rate differ from bits per second?

  Tennessee high school is organizing an alumni meeting and

tennessee high school is organizing an alumni meeting and is inviting the students of class of 1992-1993. an automated

  Questionon modern networked computers maintaining the

questionon modern networked computers maintaining the correct time on each machine is important. computers on a lan or

  How do the servers and clients interact

Describe the characteristics of any commercial distributed system you have access to. What services are provided? How do the servers and clients interact?

  Take two command line arguments and the dictionary

Your program, called should take two command line arguments, the dictionary, and the text that you wish to spellcheck.

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