Lệnh gán và các tác vụ tăng giảm 1. Bài tập 1
Lệnh gán và các tác vụ tăng giảm 1. Bài tập 1
Lệnh gán và các tác vụ tăng giảm 1. Bài tập 1
1. Bài tập 1
int main()
radius = 2.5;
height = 32.0;
cout << "The volume of the cylinder is " << volume << endl;
return 0;
Bài tập 2
Fill in the blanks to complete the code so that the printed results are as expected. The size of each
blank is just 2.
int main()
num1 += num2;
num2 *= num2;
num4 -= num3;
return 0;
15 25 2
2. Bài tập 3
Fill in the blanks so that the printed results are as expected. The size of the blank is 4.
int main()
int a,b,c,d;
a = 1;
c = 3;
return 0;
2 122
What library header must be included when function setw() or setprecision() is
used?
string
iostream
iomanip
math.h
int main()
<< "---\n"
return 0;
18
124
---
148
In order to use function sqrt() in the program, which header file must be included in
the beginning of the program?
math.h
iostream
string
stack
int main()
cout << num1 << " times " << num2 << " is " << product << endl;
return 0;
#include
int main()
float average;
cout << "The average of the numbers is " << average << endl;
return 0;
int main()
return 0;
str1 is:
str2 is: Good Morning
int main()
return 0;
Hãy đọc đoạn văn bên dưới và điền các từ bị thiếu vào chỗ trống.
return 0;