Tagged: reverse of a number

0

Reverse of a Number using while loop in C

Program code to find Reverse of a Number in C: #include<stdio.h> #include<conio.h> void main() { int n,a,r,s=0; clrscr(); printf(“\n Enter The Number:”); scanf(“%d”,&n); a=n; //LOOP FOR FINDING THE REVERSE OF A NUMBER while(n>0) { r=n%10;...

8

Reverse of a Number using For loop in C

Program code to find Reverse of a Number in C: #include<stdio.h> #include<conio.h> void main() { int i,n,r,s=0; clrscr(); printf(“\n Enter The Number:”); scanf(“%d”,&n); //LOOP FOR FINDING THE REVERSE OF A NUMBER for(i=n;i>0; ) { r=i%10;...

0

Reverse of a Number using do-while loop in C

Program code to find Reverse of a Number in C: #include<stdio.h> #include<conio.h> void main() { int n,a,r,s=0; clrscr(); printf(“\n Enter The Number:”); scanf(“%d”,&n); a=n; //LOOP FOR FINDING THE REVERSE OF A NUMBER do { r=n%10;...

2

Reverse of a Number using do-while loop in C++

Program code to find Reverse of a Number: #include<iostream.h> #include<conio.h> void main() { int n,a,r,s=0; clrscr(); cout<<“\n Enter The Number:”; cin>>n; a=n; //LOOP FOR FINDING THE REVERSE OF A NUMBER do { r=n%10; s=s*10+r; n=n/10;...

0

Reverse of a Number using while loop in C++

Program code to find Reverse of a Number: #include<iostream.h> #include<conio.h> void main() { int n,a,r,s=0; clrscr(); cout<<“\n Enter The Number:”; cin>>n; a=n; //LOOP FOR FINDING THE REVERSE OF A NUMBER while(n>0) { r=n%10; s=s*10+r; n=n/10;...

0

Reverse of a Number using For loop in C++

Program code to find Reverse of a Number: #include<iostream.h> #include<conio.h> void main() { int i,n,r,s=0; clrscr(); cout<<“\n Enter The Number:”; cin>>n; //LOOP FOR FINDING THE REVERSE OF A NUMBER for(i=n;i>0; ) { r=i%10; s=s*10+r; i=i/10;...