Trouble aligning columns (Newbie)

Hi I'm a green grasshopper with programming. :( Just started a class this fall semester and I'm just having trouble. I'd like to think I pick up on things fast but I don't know anymore.

Anyway my question is about getting my columns to align properly as I don't know why they are some are off to the right too far all of the sudden, etc.

This assignment I have is from a previous assignment where we have to make an exercise calculator.

I am also having trouble getting the code right for calculating hours. It's supposed to be calculated like this.
Calculate the total amount of time spent working out in hours and minutes. This can be done by adding up the minutes spent in each activity and using the / and % operators to calculate the quotient and remainder produced by dividing this number by 60.
But I don't really get how to formulate that.

My columns are supposed to look like this.

Here are the results for Joe Cool:

Activity Time Calories
----------------------------------
Badminton 1:13 587.796
Running 1:04 1018.944
Walking 1:39 652.212
Weights 0:33 253.638
----------------------------------
Totals 4:29 2512.590

My entire code looks like this:

#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

int main()

{

cout << "Welcome to (My name) workout calculator!" << endl;
cout << endl;

cout << "Please enter your name: " << endl;
string name;
getline(cin, name);

cout << " Please enter your weight: " << endl;
unsigned int weight;
cin >> weight;
cin.ignore(100, '\n');

cout << "Please enter the minutes spent playing badminton: " << endl;
unsigned int minsbadminton;
cin >> minsbadminton;
cin.ignore(100, '\n');

cout << "Please enter the minutes spent running: " << endl;
unsigned int minsrunning;
cin >> minsrunning;
cin.ignore(100, '\n');

cout << "Please enter the minutes spent walking: " << endl;
unsigned int minswalking;
cin >> minswalking;
cin.ignore(100, '\n');

cout << "Please enter the minutes spent lifting weights: " << endl;
unsigned int minsweights;
cin >> minsweights;
cin.ignore(100, '\n');

unsigned int totalmins = minsbadminton + minsrunning + minswalking + minsweights;

const double BADMINTON = .044;
const double RUNNING = 0.087;
const double WALKING = 0.036;
const double WEIGHTS = 0.042;

double TTLCALBADMINTON = BADMINTON * weight;
double TTLCALRUNNING = RUNNING * weight;
double TTLCALWALKING = WALKING * weight;
double TTLCALWEIGHTS = WEIGHTS * weight;
double TTLCALSBURNED = TTLCALBADMINTON + TTLCALRUNNING + TTLCALWALKING + TTLCALWEIGHTS;

cout << "Here are the results for " << name << ":" << endl;
cout << "-----------------------------------------" << endl;
cout << "Activity" << left << setw(10) << right << "Time" << setw(15) << right << "Calories" << setw(20) << endl;
cout << "Badminton " << left << setw(10) << TTLCALBADMINTON << right << setw(20)<< endl;
cout << "Running " << left << setw(10) << TTLCALRUNNING << right << setw(20) << endl;
cout << "Walking " << left << setw(10) << TTLCALWALKING << right << setw(20) << endl;
cout << "Weights " << left << setw(10) << TTLCALWEIGHTS << right << setw(20) << endl;
cout << "-----------------------------------------" << endl;
cout << "Totals " << left << setw(10) << endl;


system("PAUSE");
return 0;

}

In the time column it's supposed to be the hours calculated but I haven't figured that out yet.

Thanks in advance for any help. I'm not really looking for an answer just how to arrive there and what I'm doing wrong. My program compiles just fine just my columns look messy.
Strange. When I put my example of how my columns are supposed to look. It looks crappy. I'm sorry about that. But basically they're all supposed to align to each column :/
Topic archived. No new replies allowed.