write a while loop program for 1234 get printed 4231
Answers
Answered by
0
int main()
{
int r=0,s=0,n;
n=1234;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
cout<<s;
getch();
return 0;
}
{
int r=0,s=0,n;
n=1234;
while(n>0)
{
r=n%10;
s=s*10+r;
n=n/10;
}
cout<<s;
getch();
return 0;
}
Similar questions
English,
8 months ago
Business Studies,
8 months ago
English,
1 year ago
English,
1 year ago
Biology,
1 year ago