
Patrick B. answered 03/20/20
Math and computer tutor/teacher
using namespace std;
#include <iostream>
int main()
{
int iLoop=0;
// arrays for miles and kilometers
int miles[50];
double kilo[50];
//main loop
for (iLoop=0; iLoop<50; iLoop++)
{
miles[iLoop]=(iLoop+1); //stores the values for miles 1,2,3,....,50
kilo[iLoop] = miles[iLoop]*1.61; // multiplies each each in miles by 1.61
}
//table header
cout << " MILES = KILOMETERS "<< endl;
//outputs the rows of the table: miles vs Kilometers
for (iLoop=0; iLoop<50; iLoop++)
{
cout << miles[iLoop] << " " << kilo[iLoop] << endl;
}
}
AAA 7.
Could you please add setw so the miles and kilometers values have a width of 10 between them, also add width of 5 between mile and = ,a width of 5 between = and kilometers So it looks good Thank you03/20/20