Outputting the number of iteration

Assignment Help Basic Computer Science
Reference no: EM132254100

This my lab question I need to write code. But I do not know how to write code. Please someone can help me to this code. I need someone explain to me step by step while writing this code.

Write a program, with procedures, which will take two inputs from the user:

How many times do you want the outer loop to run?

And

How many times do you want the inner loop to run?

Now, write the code necessary to run two loops, the type of loop is left to the programmer, which are nested and output the number of iterations of both the inner and outer loops, outputting the number of each iteration. i.e.

How many times does the outer loop run? 5

How many times does the inner loop run? 10

Outer loop iteration: 1

Inner Loop iteration: 1

Inner Loop iteration: 2

...

Outer Loop iteration: 2

Inner Loop iteration: 1

Inner Loop iteration: 2

...

And so on...

Wow! That was 50 iterations total for the inner loop.

Of course, your numbers will be different, and you will need to calculate how many iterations that inner loop really performed.

Submit your .cpp file

Reference no: EM132254100

Questions Cloud

What rights should be restored to a convicted felon : What rights should be restored to a convicted felon when he or she has completed the court-imposed sentence? What rights should not be restored?
Describe the main methods sergeant baldwin use : Describe the main methods Sergeant Baldwin and his staff use to maintain order and safety in the prison. Take a position on the effectiveness, risks.
Amount of income generated from each class : Then display the total number of tickets sold, the amount of income generated from each class and the total ticket sales.
Logical logistics vendor contracts contains identified asset : Determine whether each of Logical Logistics’s vendor contracts contains an identified asset.
Outputting the number of iteration : Now, write the code necessary to run two loops, the type of loop is left to the programmer, which are nested and output the number of iterations
Difference between a composite key and a composite attribute : Discuss the difference between a composite key and a composite attribute.
Shift depending on the location of circumstance : Could you talk more about how threats can shift depending on the location of circumstance?
How do we communicate with each other : A major wildfire continues to grow. As the incident commander answer the following: How do we communicate with each other?
Second for loop to iterate through the sorted : Use a second for loop to iterate through the sorted array and display each number separated by a space.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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