|
Variables -Names of place to store values Assignment - Storing the value of an expression into a variable. Output Input Repetition Selection -Making a choice to execute or skip a statement (or group of statements) Selection -Choose to execute one statement (or group of statements) or another statement (or group of statements) NumberRead number1 number2 3 55 70 55 70 2 1 1 2 33 33 33 33 Data 3 55 70 2 1 33 33 numberOfPairs 3 C++ (AHHHHHHHHHHHHHHHHHHHHH) #include <iostream> using namespace std; void main () { int numberread, number1, number2, numberofpairs; cout << "How many pairs of values are to be read"; cin >> numberofpairs; numberread=0; while(numberread < numberofpairs) { cout << "Enter two numbers separated by a blank; press return"; cin >> number1; cin >> number2; if (number1 < number2) cout << number1 << " " << number2; else cout << number2 << " " << number1; numberread = numberread + 1; } } Top-Down Design Top-Down Design -Problem-Solving technique in which the problem is divided into subproblems; the process is applied to each subproblem. Modules -Self-contained collection of steps, that solve a proble or subproblem Abstract Ste- -An algorithmic step containing unspecified details Concrete Step -An algortithm step in which all details are specified. Problem -Create a list that....etc |
| Leave a Comment: |