PRF192_-_FA_2024_-_Block_5_-_PE_-_s_5_3220.webp
T

PRF192_-_FA_2024_-_Block_5_-_PE_-_s_5_3220.webp

Question 9:
(1 mark, file to be edited: Q9.c)
Your program should allow users to enter an integer 'n'.
The program prints hexadecimal representation of 'n' if it is a prime number; else the program prints:
"n is not a prime number" where 'n' is the number entered by the user.
61
OUTPUT:
0x3D
Press any key to continue
24
OUTPUT:
24 is not a prime number
Press any key to continue
Question 10:
(1 mark, file to be edited: Q10.c)
Your program allows users to enter a binary number 'n', where 'n' has maximum length 2 bytes.
The program prints the decimal value of 'n'.
Below is an example when 'n' = 110110111
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRF192_-_FA_2024_-_Block_5_-_PE_-_s_5_3220.webp
File size
144.4 KB
Dimensions
1920px x 813px

Share this media

Back
Bên trên Bottom