soccerTrack01

soccerTrack01 - cin>> sideLine cout<< endl<<...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// file: soccerTrack01.cpp // author: j. dzuback // date: 09/10/09 / /* *************** the program prompts the user to enter the length and width (in yards) of the soccer pitch. It then calculates the distance a player, running on the outside edge of the pitch, would cover. **************** */ #include <iostream> using namespace std; u int main() { int sideLine; int endLine; int totalDistance; cout << "Enter the length of the side line (in yards), and the press Enter: ";
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cin >> sideLine; cout << endl << endl; cout << "Enter the length of the end line (in yards), and the press Enter: "; cin >> endLine; cout << endl << endl; totalDistance = sideLine + sideLine + endLine + endLine; cout << "The player will run " << totalDistance << " yards around the soccer pitch"; cout << endl << endl; return 0; } // end of main...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online