soccerTrack01 - cin >> sideLine; cout...

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 &gt;&gt; sideLine; cout &lt;&lt; endl &lt;&lt; endl; cout &lt;&lt; &quot;Enter the length of the end line (in yards), and the press Enter: &quot;; cin &gt;&gt; endLine; cout &lt;&lt; endl &lt;&lt; endl; totalDistance = sideLine + sideLine + endLine + endLine; cout &lt;&lt; &quot;The player will run &quot; &lt;&lt; totalDistance &lt;&lt; &quot; yards around the soccer pitch&quot;; cout &lt;&lt; endl &lt;&lt; endl; return 0; } // end of main...
View Full Document

This note was uploaded on 02/08/2011 for the course CSC 101 taught by Professor Joedzuback during the Spring '11 term at Union County.

Ask a homework question - tutors are online