PRF193_PE_SP25_102556_3495.webp
May76

PRF193_PE_SP25_102556_3495.webp

  • Media owner May76
  • Ngày thêm
Kizspy.me
2 of 3
Paper No: 1
The given file Q1.cpp contains statements to input an integer month (1<= month <=12). You should
write statements to print the season corresponding to the entered month.
Hints:
-Each season has 3 months named sequentially as Spring, Summer, Autumn, Winter.
-When printing the result, do not go to the next line (do not insert "\n" or endl)
Notes:
-Do not edit given statements in the main function.
- You can create new function(s) if you see it is necessary.
Sample input and output:
Input: 3
Input: 4
Input: 9
Input: 10
After processing:
Spring
After processing:
Summer
After processing:
Autumn
After processing:
Winter
Output for marking:
OUTPUT:
Output for marking:
OUTPUT:
Spring
Summer
Output for marking:
OUTPUT:
Autumn
Output for marking:
OUTPUT:
Winter
Question 2:
(3 marks)
The given file Q2.cpp already contains statements to input the integer variable named n. You should
write statements to calculate expression value:
Zoom
+ 100%
S =
12+22+32 + 42 + ... + n²
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom