Program flow

  1. Define the goal.
Read two numbers and print the result.
  1. Write the requirements.
The user enters two numbers.
The program calculates the result.
The program prints the result.
  1. Break the problem into parts.
- read first number
- read second number
- calculate result
- print result
  1. Turn parts into functions.
readNumber();
calculateResult();
printResult();
  1. Decide the flow.
input -> calculation -> output
  1. Start with main().
int main()
{
    // readNumber();
    // calculateResult();
    // printResult();

    return 0;
}
  1. Implement one piece at a time.
prototype -> body -> test