PRF192_-_FA_2024_-_PE_-_s_-_8_2867.webp
Riza851

PRF192_-_FA_2024_-_PE_-_s_-_8_2867.webp

  • Media owner Riza851
  • Ngày thêm
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
-3
Case 2: Enter N = -3
Zoom
OUTPUT:
-3 is not a positive integer Press any key to continue
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRF192_-_FA_2024_-_PE_-_s_-_8_2867.webp
File size
264.7 KB
Dimensions
2880px x 1478px

Share this media

Back
Bên trên Bottom