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
5
Answer:
See this.
Explanation:
I hope this will help you..Please mark this answer as the brainliest.
Attachments:
Answered by
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