PRF192_-_SP_2024_-_Block_5_-_RE_1958.webp
Đ

PRF192_-_SP_2024_-_Block_5_-_RE_1958.webp

}
(Choose 1 answer)
main() {
What would happen if the user types in number 3 and presses Enter when running this program?
int x = 5;
char c;
printf("Enter x = ");scanf("%d", &x);
printf("Calculate square? (Y/N): ");
c = getchar();
if (c == 'Y' || c == 'y')
printf("sqr = %d", x*x);
A. sqr = 9
B. sqr = 25
C. The program exits without printing the square
D. It depends on whether the user enters 'Y' or not, being asked "calculate square?"
FUO

Thông tin

Category
PRF192
Thêm bởi
Đức Thành2
Ngày thêm
Lượt xem
1,677
Lượt bình luận
5
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRF192_-_SP_2024_-_Block_5_-_RE_1958.webp
File size
206.6 KB
Dimensions
1920px x 892px

Share this media

Back
Bên trên Bottom