Write the same program using a for-loop

Assignment Help Computer Engineering
Reference no: EM13708739

Question: Write a program with a while loop to print 1 to N in square brackets. N is an integer input from the user.

Part 1: Write the same program using a for-loop

Part 2: Write the same program that will display only the even numbers and odd numbers from 1 to N.

Can you please help me? I don't know what to do to write this C++ program.

 

Reference no: EM13708739

Questions Cloud

Formal risk assessment of the external server : As part of a formal risk assessment of the external server in a small Web design company, you have identified asset "integrity of the organization web server and the threat hacking and defacement of the web server.
Explain what is the percent purity of aspirin in the sample : Question- 1.) If your Aspirin sample did not dry completely and contained water in the sample would it require more or less NaOH solution to reach the endpoint of the titration?
Find the volume of each cylinder : Suppose that you are building 5 cylindrical nuclear reactors of various diameters. Ask the user to input height and diameter of each cylinder.
Write a balanced equation for the combination reaction : Question- Write a balanced equation for the combination reaction described, using the smallest possible integer coefficients. When sulfur dioxide combines with oxygen, sulfur trioxide is formed.
Write the same program using a for-loop : Write the same program using a for-loop - write the same program that will display only the even numbers and odd numbers from 1 to N.
Write the balanced net ionic equation for the reaction : Question- The following molecular equation represents the reaction that occurs when aqueous solutions of lead(II) nitrate and barium chloride are combined. Pb(NO3)2 (aq) + BaCl2 (aq) PbCl2 (s) + Ba(NO3)2 (aq)
Can you find the 2s complement of the given numbers : Perform the given operations and identify, in each case, whether or not an overflow occurs:
What weight of magnesium chloride must be weighed out : Question- A solution, in which the magnesium concentratio is 50mg/L, is needed. The source of magnesium ions is magnesium chloride. If 1.5L of the solution is needed, what weight of magnesium chloride must be weighed out. (FW of Mg is 24.305g/mol ..
Dynamic array of a string that takes in names : Can you please show me an example of a C++ Class that has a dynamic array of a string that takes in names by user input??

Reviews

Write a Review

Computer Engineering Questions & Answers

  Describe the meaning of storage density

Describe the meaning of storage density

  What are the output format characters

How is the input and output processing structured in the C language? How can you show some combination of words and numbers on the computer's screen? How to get information from a keyboard to be used in your program.

  Determine what particular piece of hardware

Specifically solution provides the learner an understanding of what steps to take to troubleshoot hardware issues. While directed specifically towards troubleshoot the workstation connectivity problem, the solution is applicable to troubleshooting..

  Make two alternative design strategies

Describe two alternative design strategies, and explain how each would meet the requirements. What are the constraints in this situation.

  Design a unix shell script that searches for a text file

make a Unix shell script that searches for a text file with most occurrences of a given keyword. For instance, if I would like to search for a script with most usages of if statement, I would execute.

  Question1 obviously conceptual data modelling is a

question1. obviously conceptual data modelling is a time-consuming and costly process. examine potential drawbacks to

  Program that continuously outputs random numbers

Write down a code in Java that continuously outputs random numbers between 0 and 10000 until a number which is divisible by 5 is encountered.

  Define some data are calculated as functions

Some data are calculated as functions. When will you store data in database and when would you use functions? What is the advantage of storing data in database.

  When should a static local variable be used

Can a function have a local variable with the same name as a global variable?

  The evolution of a health care information system

Discussion of an evolution of a health care information system, such as order entry results reporting, electronic health record, office-based medical records, or others. Include the following.

  Write a function that converts an input of some integer

Write a function that converts an input of some integer number of inches into outputs of integer numbers of yards, feet, and inches. Do not write a main function. Your function does not do cin or cout.

  What is the data transfer rate across the bus

What is the data transfer rate across the bus (in bytes/second) for this microprocessor and can you solve this problem I got stuck it's important!!.

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