RHS C++ Tutorial
- Monday
- Introduction to Programming
- Problem Solving
- Structure fo C++ Program (helloprogram.cc)
- Comments
- Compiler Directives
- Declarations
- Statements
- Output (helloprogram.cc)
- Data types (integers, float, double, char)
- Variables
- Input (hello2.cc)
- Assignment statements (temp.cc)
- Write a program to convert Celsius to Fahrenheit
- Write a program that reads the number of days and outputs the number of seconds
- Write a program that reads in three grades and outputs the total and the average
- Write a program that finds the surface area and volume of a sphere with a given radius.
- Functions
- Tuesday
- Logical Expressions (Relational, Equality, Logical)
- if
- Write a program that allows the user to select whether to convert Celsius to Fahrenheit or vice-versa and then does the conversion.
- Write a program that reads in three lengths of sides and determines if the three can be used as a triangle; if so, determine if it is a right-triangle; if is, determine the area of the triangle.
- for
- Write a program that reads in a pre-determined number of temperatures and outputs the minimum, maximum, and average temperatures.
- while / do while
- Write a program that reads in an arbitrary number of temperatures and outputs the minimum, maximum, and average temperatures.
- Write a program that determines the gross pay for each of several employees. The company pays "straight time" for the first 40 hours and "time and a half" for all hours worked in excess of 40 hours. You are given a list of employees, the number of hours each employee worked last week, and the hourly rate of each employee. Your program should input this information and display the employees' gross pay.
- Write a program that reads in the side of a square (1-20) and then prints a hollow square of that size out of asterisks and blanks.
- A palindome is a number or a text phrase that reads the same backwards as forwards. For example, 12321, 55555, 45554, and 11611 are palindromes. Write a program that reads in a five-digit integer and determines whether or not it is a palindrome. [Hint: Use the division and modulus operators operators to separate the number into its individual digits.]
- case-switch
- unary operators
- Wednesday
- I/O manipulations
- arrays
- Write a program that reads in an arbitrary number of temperatures and outputs the second largest temperature.
- character strings
- functions
- file i/o
- classes