14. Create a class with the following specification:
Class Name : Sum
Data Members
a[] : array of integer type
n : size of array
Member Method
Sum(int s) : Parameterised constructor to initialize ‘n’ with ‘s’ and declare array of size ‘n’
chkDsc(int d) : Returns true if digits of the number are in descending order otherwise false
chkFst(int e) : Returns true if first digit of the number is prime otherwise false.
compute() : Prints the sum of only those numbers from array whose digits are arranged in
descending order and its first digit is prime. If no such such number is found it shall print the relevant message.
You need not write the main() method.
Answers
Answered by
0
Explanation:
plz follo me plz make me on the brainlist
Similar questions