Unformatted text preview:

Slide 1Slide 2Slide 3Slide 4Slide 5COSC 181 – Foundations of Computer ProgrammingClass 4Last TimeVariables and Computer MemoryPractice with “arithmetic operators”arithmetic precedencePractice with “relational operators”overall operator precedenceToday’s GoalsIntroduction to Assignment #1Introduction to Software Engineering processPrecedence 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char 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 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


View Full Document

UVa-Wise COSC 181 - Foundations of Computer Programming

Download Foundations of Computer Programming
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Foundations of Computer Programming and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Foundations of Computer Programming 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?