CSE202Lab3

CSE202Lab3 - CSE 202 Lab 3 NOTE: No need to submit anything...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CSE 202 Lab 3 NOTE: No need to submit anything electronically. Only turn in your answers for 1 and 3 on a piece of paper. Make sure you are saving the source codes as different names so you don’t overwrite your previous work. If your programs ever get stuck in an infinite loop, press control + C to kill (stop) the program. Before beginning, from the terminal, create a new directory called lab3, and change your working directory to lab3. To see how, refer to the last lab. 1. Create a new file, if_exercise1.cpp (e.g. ). Type in the following program exactly as shown, save it (control + X then control + S), and compile it. After execution, what happens? Why? Is the output what you had expected? #include <iostream> using namespace std; int main() { int count = 15; if (count < 59) cout << count << endl; count++; cout << count << endl; return 0; } 2. Type in the following program, save it, and compile it. Note that there are bugs in it you will have to eliminate. The compiler spits out line numbers next to the actual errors.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

CSE202Lab3 - CSE 202 Lab 3 NOTE: No need to submit anything...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online