Computer Science, asked by ShaunKing, 9 months ago

Write a program in java to create a function reverseexample(int n) which reverses the number sent as argument. Pass a number using call by value method

Answers

Answered by anindyaadhikari13
5

Answer:

See this.

Explanation:

I hope this will help you..Please mark this answer as the brainliest.

Attachments:
Answered by Anonymous
0

Answer:

Code:

int reversDigits(int num)

{

int rev_num=0;

while(num>0)

{

rev_num = rev_num*10+num%10;

num = num/10;

}

return rev_num;

}

int main()

{

int num = 521;

Cout <<”Reverse of no. is”

<<reversDigits(num);

return 0;

}

Similar questions