void perform( int n)
int s=0,g;
while( n>0)
if (n%2=1)
n/=10;
g=n%10;
System.out.print("\n g = \t" + g);
s=s+g;
n/= 5;
System.out.print("\n s = \t" + s);
please I need the answer fast
I will surely mark as brainliest
pleaseeeeee
Answers
Answered by
3
Answer:
= 5;System.out.print("\n s = \t" + s);...
Question 3 The following is a method/function of some class. Give the output of the
perform() when the value of 'n' is 6579. Show the dry run/ working.
void perform( int n)
int s=0,g;
while( n>0)
if (n%2=1)
n/=10;
g=n%10;
System.out.print("\n g = \t" + g);
s=s+g;
n/= 5;
System.out.print("\n s = \t" + s);
Explanation:
Similar questions