C++ Intro

 

  • Birthdate
  • Distance Travelled
    • The distance a vehicle travels can be calculated as follows: distance = rate * time. For example, if a train travels 40 miles per hour for 3 hours, then the distance is 120 miles.
    • Write a program that
      • asks the user for the speed of a vehicle (in mph)
      • how many hours they traveled
      • the program then sends this information to the function void printData( int mph , int hours ) .
      • This  function should use a loop to display the distance the vehicle has traveled for each hour of of that time period. Here is an example of the output
      • What is the speed of your vehicle in mph? 40
      • How many hours has it traveled ? 3
      • Hour Distance Traveled
        1 40
        2 80
        3 120
  • Grade GPA program
    • Code for Project
    • float mean( float arr[]){    }
    • float largest( float arr[]){   }
    • after the functions work, ask the user for the test scores
      //via cin and populate the array with those numbres
    • **  to get a 100% implement secondLargest()
  • next project:TBA