Introduction+to+Programming+Notes

**January 12, 2011**

 * ===When typing in the commands, you have to make sure that you word it right===
 * ===Knowing the difference between which info is the input and the output is important===
 * ===Be sure to check your work thoroughly before executing===
 * ===Putting quotations in the right places helps===
 * ===If you are unsure of what to do next, go back and look over previous assignments===
 * ===Use the selection option to put info into groups===
 * ===Click on the boxes to you the Toggle Breakpoint===
 * ===To input spaces, + " "===
 * ===When comparing be sure to put in the correct symbols===

January 19, 2011

 * ===﻿The two main programming software are completely different===
 * ==Raptor is easier to deal with==

January 26, 2011

 * ===﻿Do not put ; at the end of loops and if or else statements===
 * ===Make sure to put ; it the right places===
 * ===Think about what you want to do before starting the how to do it===
 * **Sometimes the error says missing ; but in an assignment statement, the = is missing**

February 2, 2011

 * ===//represents a comment line and doesnt affect the program//===
 * ==# include is used to tell the processor to use the standard file==

c++ Examples:

 * 1) include need this for input/output, cin, cout

using namespace std;

void main { int GradeNumber = -1; set to -1 so while loop runs

do{

cout << "What is your grade? ";

cin >> GradeNumber;

}while(GradeNumber < 0 || GradeNumber > 100);

while (GradeNumber < 0 || GradeNumber > 100) { cout << "What is your grade? " ; cin >> GradeNumber; } char GradeLetter = ' ' ;

if (GradeNumber >= 90) { GradeLetter = 'A' ; } else

if (GradeNumber >= 80) { GradeLetter = 'B' ; another line of code could go here//

} else

if (GradeNumber >= 70) { GradeLetter = 'C' ; } else

if (GradeNumber >= 60) { GradeLetter = 'D' ; } else

GradeLetter = 'F' ; cout << "Your grade is " << GradeLetter << endl; system( "pause" ); need this so the console screen doesn't just

}