Beginner

I am very new at c++ and I am trying to get create a program where the user can type in the information that will added up to get and then they will get end up getting the total of all three numbers. This is what that code looks like:
#include <cstdlib>
#include <iostream>
#include <string>
#include <iomanip>

/*
*
*/
int main(int argc, char** argv) {

using namespace std;


string DriverOne; //The First race car name
string DriverTwo; // Second race car name
string DriverThree; // Third race car name
int CarNum; // Car Number
string CarColor; // Color of the car
int LapTime1; // Lap Time of the first lap
int LapTime2; // Lap time of the second lap
int LapTime3; // Lap time of the third lap
string TotalLapTime;

DriverOne = ("Billy");
DriverTwo = ("Susan");
DriverThree = ("Mike");

cout<<"Driver Name:"<< DriverOne<< endl;
// Must enter the race car number
cout <<"Enter the car number:";
cin >> CarNum;

// Must enter the race car color
cout <<"Enter the color of the car:";
cin >>CarColor;

// Must enter the lap time of the first lap
cout <<"Enter the lap time of the first lap:";
cin >>LapTime1;

// Must enter the lap time of the second lap
cout<<"Enter the lap time of the second lap:";
cin >> LapTime2;

// Must enter the lap time of the third lap
cout << "Enter the lap time of the third lap:";
cin >>LapTime3;

TotalLapTime = LapTime1 +LapTime2 +LapTime3;

cout << "Driver Name:" << DriverOne <<endl;
cout <<"The car number:" <<CarNum <<endl;
cout <<"The color of the car:" <<CarColor <<endl;
cout <<"The first lap time:" <<LapTime1 <<endl;
cout <<"The second lap time:" <<LapTime2 <<endl;
cout <<"The third lap time:" <<LapTime3 <<endl;




return 0;
}
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/beginner/192563/
Topic archived. No new replies allowed.