// // main.cpp // // Created by Robert Metcalfe on 5/03/2014. // Copyright (c) 2014 Robert Metcalfe. All rights reserved. // // cout_formatting // Format a logarithmic table to standard output via std::cout and ... // Also use: std::cout.precision([numberSignificantNumbers]) ... setw([colWidth]) ... endl #include #include #include "math.h" int main() { int rows, columns, n, i, j; double base1 = 7.0, base2; std::cout << "Log values program" << std::endl << std::endl; std::cout << "Enter start logarithm value: "; std::cin >> base2; std::cout << "Enter how many logarithm values: "; std::cin >> rows; std::cout << "Enter start base value: "; std::cin >> base1; std::cout << "Enter how many base values: " ; std::cin >> columns; std::cout << "Enter precision (number of significant numbers): "; std::cin >> n; std::cout.precision(n); std::cout << std::endl << std::endl << "Table starts at logarithm of b = " << base2 << " with base a = " << base1 << std::endl; std::cout << "Log values "; for( j=0; j