PRF192_-_FA_2024_-_PE_-_s_-_5_2869.webp
thanhphuong

PRF192_-_FA_2024_-_PE_-_s_-_5_2869.webp

Question 2:
(1 mark, file to be edited: Q2.c)
The program asks the user to enter a positive integer N using the keyboard (STDIN).
Print the sum of the values of the numbers from 1 to N.
Here are two examples:
Case 1: Enter N = 10
10
OUTPUT:
55
Press any key to continue
Case 2: Enter N = -3
-3
OUTPUT:
-3 is not a positive integer Press any key to continue
Question 3:
(1 mark, file to be edited: Q3.c)
Zoom
100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRF192_-_FA_2024_-_PE_-_s_-_5_2869.webp
File size
155.7 KB
Dimensions
1920px x 1051px

Share this media

Back
Bên trên Bottom