๐คํ๋ก๊ทธ๋๋ฐ ์ธ์ด/C++๊ธฐ์ดํ๋ฌ์ค ์ฐ์ต๋ฌธ์
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 08 ํจ์์ ํ์ฉ p.555~ 1๋ฒ~7๋ฒ
1๋ฒ #include using namespace std; void print(char* a, int n = 0); int main() { char a[50]; int n,count=0; for(;;) { cout n).get(); if (n == 0) { print(a); count++; } else for (int i = 0; i < count; i++) print(a, n); } return 0; } void print(char* a, int n) { cout
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 07 ํจ์-C++์ ํ๋ก๊ทธ๋๋ฐ ๋ชจ๋ p.462~ 7๋ฒ~10๋ฒ
7๋ฒ #include const int Max = 5; double * fill_array(double * a, double * b); void show_array(double* a, double* b); void revalue(double r, double* a, double* b); int main() { using namespace std; double properties[Max]; double * b = fill_array(properties, properties + Max); show_array(properties, b); if (properties != b) { cout > factor)) { cin.clear(); while (cin.get() != '\n') continue; cout
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 07 ํจ์-C++์ ํ๋ก๊ทธ๋๋ฐ ๋ชจ๋ p.461~ 1๋ฒ~6๋ฒ
1๋ฒ #include double aver(double x, double y); int main() { using namespace std; double x, y,z; for(;;) { cout > x >> y; if (x == 0 || y == 0) break; z = aver(x, y); cout
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 06 ๋ถ๊ธฐ ๊ตฌ๋ฌธ๊ณผ ๋ ผ๋ฆฌ ์ฐ์ฐ์ p.370~371 6๋ฒ~9๋ฒ
6๋ฒ #include struct donation_info { char name[20]; double donation; }; int main() { using namespace std; cout > n; donation_info * SPRI = new donation_info[n]; for (int i = 0; i name; cout name > (SPRI + i)->donation; } cout donation >= 10000) { cout name
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 06 ๋ถ๊ธฐ ๊ตฌ๋ฌธ๊ณผ ๋ ผ๋ฆฌ ์ฐ์ฐ์ p.368~370 1๋ฒ~5๋ฒ
1๋ฒ #include #include int main() { using namespace std; char ch; do { cout > ch; if (islower(ch)) ch = toupper(ch); else if (isupper(ch)) ch = tolower(ch); cout
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 05 ๋ฃจํ์ ๊ด๊ณ ํํ์ p.304~ 7๋ฒ~10๋ฒ
7๋ฒ #include #include using namespace std; struct car { string name; int YearOfManufacture; }; int main(void) { int n; coutn; car *list=new car[n]; for(int i=0;i
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 05 ๋ฃจํ์ ๊ด๊ณ ํํ์ p.304~ 5๋ฒ~6๋ฒ
5๋ฒ #include int main() { using namespace std; char * month[12] = { "1์","2์","3์","4์","5์","6์","7์","8์","9์","10์","11์","12์" }; int salesrate[12],sum=0; for(int i = 0;i
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 05 ๋ฃจํ์ ๊ด๊ณ ํํ์ p.304~ 1๋ฒ~4๋ฒ
1๋ฒ #include int main() { using namespace std; cout > a; cin >> b; for (int i = a; i
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 04 ๋ณตํฉ๋ฐ์ดํฐํ p.231~ 5๋ฒ~10๋ฒ
5๋ฒ ์ฝ๋ #include #include using namespace std; struct CandyBar { string BrandName; double weight; int kcal; }; int main() { CandyBar snack = { "Mocha Munch", 2.3, 350 }; cout
(C++๊ธฐ์ดํ๋ฌ์ค 6ํ ํ๋ก๊ทธ๋๋ฐ ์ฐ์ต ์ ๋ต,์๋ฃจ์ ) CHAPTER 04 ๋ณตํฉ๋ฐ์ดํฐํ p.231~ 1๋ฒ~4๋ฒ
1๋ฒ ์ฝ๋ #include #include int main() { using namespace std; string first,last; char grade; int age; cout