Advertisement
akosiraff

Chevy and Ford VB 2010

Oct 21st, 2013
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/chevy-and-ford-vb-2010/
  3. Scenario
  4. There are eight cars in each team called Chevy and Ford. One car from each team races its opponent on the drag strip. Read in the racing times for the eight Chevy cars and then read in the times for the eight Ford cars. Store the times into arrays called Chevy[ ] and Ford[ ]. Then list the winner of each pair, giving the number of seconds the winner won by. At the end declare which team won based on which team had the most wins. Below is a sample match.
  5. Enter the times for the Chevy cars: 5.4 7.2 4.0 9.1 5.8 3.9 6.2 8.1
  6. Enter the times for the corresponding Ford cars: 5.8 6.9 3.9 9.2 5.8 3.8 6.0 8.5
  7. And the winners are:
  8. Chevy by 0.4 sec
  9. Ford by 0.3 sec
  10. Ford by 0.1 sec
  11. Chevy by 0.1 sec
  12. Tie !
  13. Ford by 0.1 sec
  14. Ford by 0.2 sec
  15. Chevy by 0.4 sec
  16. And the winning team is: F O R D !
  17. • Accept the racing times for each of the Chevy cars into the array Chevy[ ].
  18. • Accept the racing times for each of the Ford cars into the array Ford[ ].
  19. • Then declare the wining car for each race, giving the winning time in seconds.
  20. • If the times are identical, then declare the race was a tie.
  21. • Finally, declare which team won the match, assuming a tie is possible.
  22.  
  23. Download: http://solutionzip.com/downloads/chevy-and-ford-vb-2010/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement