practice 1. introductioncvlab.khu.ac.kr/practice01.pdf · practice 1. introduction 10 output...
TRANSCRIPT
Practice 1. Introduction Practice 1. Introduction
2
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
Practice 1. Introduction
4
include <iostream> using namespace std; int main { cout << ’We are learning ’; cout << ’C++ language’; return 0; }
Practice 1. Introduction
Practice 1. Introduction
5
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
Practice 1. Introduction
7
Practice 1. Introduction
8
Output result
Practice 1. Introduction
9
Output result
Practice 1. Introduction
10
Output result