☑Kizspy.me
3 of 4
Paper No: 1
After processing: result = 1.70
After processing: result = 1.80
Output for marking:
OUTPUT:
1.70
Output for marking:
OUTPUT:
1.80
Question 3:
(3 marks)
The given file Q3.cpp already statements to input data into a 1-D array of integers. You should write the
statements to count all emirp numbers in the array. An emirp number is a prime number whose reversal
is also a prime number. For example, both 13 and its reversal 31 are prime, so 13 is an emirp. In contrast,
23 is a prime, but its reversal-32-is not prime, so 23 is not an emirp.
Notes:
-Do not edit given statements in the main function.
- You can create new functions if you see they are necessary.
Sample input and output:
Please enter the size of the array: 5
a[0]=10
a[1]=13
Please enter the size of the array: 5
a[0]=10
al11-15
Zoom
+ 100%
Activate Windows
Go to Settings to activate Windows.
Close