practice 1. introductioncvlab.khu.ac.kr/practice01.pdf · practice 1. introduction 10 output...

10

Upload: others

Post on 18-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +
Page 2: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction Practice 1. Introduction

2

Page 3: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

3

#include <iostream> using namespace std; int main() { cout << "Hello, world" << endl; cout << "I am [your name]" << endl; return 0; }

Practice 1. Introduction

Think about why we need those indentations here

Page 4: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

4

include <iostream> using namespace std; int main { cout << ’We are learning ’; cout << ’C++ language’; return 0; }

Practice 1. Introduction

Page 5: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

5

Page 6: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

6

#include <iostream> using namespace std; int main() { cout << "*" << endl; cout << "**" << endl; cout << "***" << endl; cout << "****" << endl; cout << "*****" << endl; cout << "******" << endl; cout << "*******" << endl; cout << "********" << endl; cout << "*********" << endl; cout << "**********" << endl; return 0; }

Set a breakpoint here

and execute the program line by line

Page 7: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

7

Page 8: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

8

Output result

Page 9: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

9

Output result

Page 10: Practice 1. Introductioncvlab.khu.ac.kr/practice01.pdf · Practice 1. Introduction 10 Output result. Run the visual studio and look around 1 Go through a complete build (compile +

Practice 1. Introduction

10

Output result