COSC 181 Foundations of Computer Programming Class 4 Last Time Variables and Computer Memory Practice with arithmetic operators arithmetic precedence Practice with relational operators overall operator precedence Today s Goals Introduction to Assignment 1 Introduction to Software Engineering process Precedence of Operators Overall Fig 2 14 First Assignment Practice Log in Open up DevC Open up your book Chapters 1 2 Review Write a program that asks the user for a character then stores the character in a variable Update the program so that if the stored variable equals c the program prints out You typed in a c char variableName if variableName c Now include an integer variable in your program and set it to 0 Now ask for two characters everytime a c or a g is entered add one to the variable At the end of the program print out the value of the variable
View Full Document