Question: Given a string of integers, write a program to generate an output string as follows i ) From the input integers, filter the integers that
Given a string of integers, write a program to generate an output string as follows
i From the input integers, filter the integers that are perfect squares. Ex:
ii For each perfect square obtained from step find its factorial. If the factorial of the number is trailing by zeros, three digits present before the trailing zeros should be appended to output string. If not trailing by zeros append last three digits to string. If there is a preceding zero, it is ignored.
urag
anura
i If the number is then it does not have any trailing zero zeros and there is only one digit in it so append to output.
ii If the number is then it has one trailing zero and before the trailing zero there are only two digits present so append to output.
iii. If the number is then it has one trailing zero, before trailing zero there are five digits present, so consider three digits before trailing zero that is and append to output.
n
iv If the number is then it has two trailing zeros, before anu trailing zeros there are seven digits present, so consider three digits before trailing zero that is as is preceded here, is ignored and is appended to output.
iii If there are no positive perfect squares in the input string print
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
