given a string of integers, write a program to generate an output string as follow 1)from the input ints, filter the integers that are perfect squeares 2)for each perfect square obtained from step 1 find its factorial, if the factorial of the numb is trailing by zeros, three digits present before the trailing zeros shoud be appended to output string if not trailing by zeros append last three digits to output string if there is ad receding zero it is ignored a) if the num is 2 it does not have any trailing zeros and there is only on digit in it append 2 output b) if the num is 5 it has one trailing zero and before the trailing zero there are only two present so append 12 to output d) if the num is 9 it has one trailing zero before railing zero there are 5 digits so append e) if the num is 12 then ......

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question

given a string of integers, write a program to generate an output string as follow

1)from the input ints, filter the integers that are perfect squeares

2)for each perfect square obtained from step 1 find its factorial, if the factorial of the numb is trailing by zeros, three digits present before the trailing zeros shoud be appended to output string if not trailing by zeros append last three digits to output string if there is ad receding zero it is ignored

a) if the num is 2 it does not have any trailing zeros and there is only on digit in it append 2 output

b) if the num is 5 it has one trailing zero and before the trailing zero there are only two present so append 12 to output

d) if the num is 9 it has one trailing zero before railing zero there are 5 digits so append e) if the num is 12 then ...... 

Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning