Question: Objective The objective of this assignment is to practice using loops. You will create several short programming assignments to get more familiar with C +

Objective
The objective of this assignment is to practice using loops. You will create
several short programming assignments to get more familiar with C++ looping
concepts. Please read the full document carefully before starting.
Requirements and Deliverables
This lab has three elements (A - C). Required actions include:
Develop, build and execute the code for each element
Upload your final source code for each lab element to the appropriate
CANVAS upload site. Use the following names for your source files:
Lab Element A --- Calculate and Display a Logarithm Table
Write a program that uses a loop to produce the following logarithm table on
screen. Note that the value x starts at 1, and the step (the difference of x
between two rows) is determined by the value of x; that is the step size, s=
f(x). For example,
when 1x9,s(x)=1
when 10x99,s(x)=10
when 100x999,s(x)=100 and so forth
See table below for further illustration.
When the program starts, it should prompt the user how many rows it will
calculate. Once the user enters this information, the table will be
calculated and displayed on screen.
NOTES:
You do not have to use subscript fonts for the table header. For example,
log10(x) can be displayed as log10(x)
To calculate the step size, s(x), it is recommended that you utilize the
properties of logarithms. For example, for the base 10 logarithm, it
follows that when x=120 :
log10(120)=log10(1.2**102)=log10(1.2)+log10(102)=2+0.07918=2.07918
For x=120, you want s(x)=2. Think about how you can obtain this in
your C++ code. What happens if, say, x=12 or x=1200?
You can use the following C++ functions:
 Objective The objective of this assignment is to practice using loops.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!