Computer Science, asked by subrotoc21, 10 months ago

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);​

Answers

Answered by justmobilesn
17

answer is 6

pls follow up

Attachments:
Answered by rakeshjigneshsuresh
2

Answer:

if the value of n is 7687 what will be the answer pls give urgent

Similar questions