ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 08 May 2017 My Price 8.00

Multiplying the digits of an integer

Course: 91

Please help me, i am stuck and my program wont run properly. Thank you.

Prog 1:

Multiplying the digits of an integer and continuing the process gives the surprising result that the sequence of products always arrives at a single digit number. For example,

715 ---- 35 ---- 15 ---- 5 27 ---- 14 ---- 4
4000 ---- 0
9

Course: 91

The number of times products need to be calculated to reach a single digit is called the persistence number of that integer. Thus, the persistence number of 715 is 3, the persistence number of 27 is 2, the persistence number of 4000 is 1, and the persistence number of 9 is 0. write a program that will continually prompt the user to enter a positive integer until EOF has been entered via the keyboard. For each number entered, your program should call a persistence function.

 

Prog 2:

Redo the previous program but make it a recursive solution. Your recursive persistence function should have only a single argument. Re-use the same main function implemented in the previous programming exercise.

 

 

 

Course: 91

Answers

(11)
Status NEW Posted 08 May 2017 04:05 AM My Price 8.00

-----------

Not Rated(0)