March 8, 2022 6-1 (1) #include <iostream> #include <string> using namespace std; int add(int a[], int b) { int n=0; for (int i = 0; i < b; i++) n += a[i]; return n; } int add(int a[], int b, i...
March 8, 2022 5-1 #include <iostream> #include <string> using namespace std; class Circle { int radius; public: Circle() { this->radius = 1; } Circle(int r) { this->radius = r; } void show() ...
March 8, 2022 4-1 #include <iostream> using namespace std; int main() { int *p = new int[5]; int sum = 0; double m=0.0; cout << "정수 5개 입력>> "; for (int i = 0; i < 5; i++) { c...
March 8, 2022 3-1 #include <iostream> using namespace std; class Tower { public: Tower(); Tower(int input); int getHeight(); private: int meter; }; int main() { Tower myTower; Tower seoulTower(100); ...
March 8, 2022 2-1 #include <iostream> using namespace std; int main() { for (int i = 1; i < 101; i++) { cout << i << '\t'; if (i % 10 == 0) cout << endl; } } 2-2 #include <io...
March 8, 2022 Practice #1 Write a program that reads an integer between 0 and 1000 and multiplies all the digits in the integer. (0부터 1000까지 중 임의의 수를 입력 받아, 각 자리 숫자를 곱하는 프로그램을 작성하시오.) For example, if an integer is ...