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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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