Question: I need the exact solution. For instance my integer is 7 8 4 5 1 2 and the sum of the digits is 2 7

I need the exact solution. For instance my integer is 784512 and the sum of the digits is 27.(15p) Write an Octave script that reads an integer from the user and computes the sum
of the digits of this integer. The sum should be written on the screen. (Example: If n is 5879, the
script should display 29(the digits of 5879 is 5,8,7,9 and the sum is 5+8+7+9=29)).
 I need the exact solution. For instance my integer is 784512

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!