Slide 1Slide 2Slide 3Slide 4Slide 5COSC 181 – Foundations of Computer ProgrammingClass 4Last TimeVariables and Computer MemoryPractice with “arithmetic operators”arithmetic precedencePractice with “relational operators”overall operator precedenceToday’s GoalsIntroduction to Assignment #1Introduction to Software Engineering processPrecedence of Operators (Overall)Fig 2.14()* / %+ -<< >>< <= > >=== !==First Assignment PracticeLog-in, Open up DevC++, Open up your book (Chapters 1&2)ReviewWrite a program that asks the user for a character, then stores the character in a variablechar variableName;Update the program so that if the stored variable equals “c” the program prints out, “You typed in a c”if (variableName == ‘c’) {… }Now, include an integer variable in your program and set it to 0Now, ask for two characters, everytime a c or a g is entered, add one to the variableAt the end of the program, print out the value of the
View Full Document