/* Reverse number using for loop */
#include<stdio.h>
int main()
{
int a, s;
printf("Enter value of a: ");
scanf("%d",&a);
for(s=0;a>0;a=a/10)
{
s = s*10;
s = s + (a%10);
}
printf("Reverse number is: %d",s);
return 0;
}
Related Post:
Reverse number using while loop
http://cbasicprogram.blogspot.in/2012/02/reverse-number-using-while-loop.html
#include<stdio.h>
int main()
{
int a, s;
printf("Enter value of a: ");
scanf("%d",&a);
for(s=0;a>0;a=a/10)
{
s = s*10;
s = s + (a%10);
}
printf("Reverse number is: %d",s);
return 0;
}
Related Post:
Reverse number using while loop
http://cbasicprogram.blogspot.in/2012/02/reverse-number-using-while-loop.html
only returning 621 does'nt matter what input i give........WRONG PROGRAM
ReplyDeleteworking for me
Deletecheck http://codepad.org/JIDHLUHT
Attention everyone, the file provided above is not working. I have been looking for the working file and finally found it.
Delete✔️Click Here To Download http://gestyy.com/e0GAyS
✔️Click Here To Download
✔️Click Here To Download http://exe.io/XONVsO6l
✔️Click Here To Download
✔️Click Here To Download
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Mn.
..
.
.
.
..
.
.
.
.
.
.
.
.
.
.
..
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.cx
.sdcccxxxcxxccxcxxc
this seems a wrong program..!!!
ReplyDeleteThank u so much!
ReplyDeleteWRITE THE C PROGRAM TO REVERSE A GIVEN NUMBER WITHOUT USING MODULO OPERATOR
ReplyDelete#include
Deletevoid rvrs(int arra[],int n);
int main()
{
int arra[100],i,n;
printf("How Many Element : ");
scanf("%d",&n);
printf("Enter Number : \n");
for(i=0;i= 0; i--, c++)
arra1[c] = arra[i];
for (i = 0; i < n; i++)
arra[i] = arra1[i];
for (i = 0; i< n; i++)
printf("%d\n", arra[i]);
}
Nice program . visit more good coding program collection Click Here
ReplyDeletehttps://maytinhtrananh.vn/sua-may-tinh-may-in.html
ReplyDeletehttps://phalebinhminh.com