WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
Answers were Sorted based on User's Feedback
Answer / ashok
#include<stdio.h>
#include<conio.h>
void main();
int a;
clrscr();
float rem=0,rev=0;
while(rev>=0)
{
rem=a%10;
rev=rev+rem;
a=a/10;
}
printf(Reverse of two digit no is:=%d",rev);
getch();
}
| Is This Answer Correct ? | 21 Yes | 10 No |
Answer / bhavesh kashikar
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int a;
float rem=0,rev=0;
while(rev>=0)
{
rem=a%10;
rev=rev*10+rem;
a=a/10;
}
printf(Reverse of two digit no is:=%d",rev);
getch();
}
| Is This Answer Correct ? | 13 Yes | 4 No |
Answer / ajay
#include<stdio.h>
#include<conio.h>
main()
{
int a, b,c,d;
printf("Enter a value:");
scanf("%d", &a);
if (a%10==0)
{b=a/10;
printf("Reverse value is:%0d", b);}
else
{c=a%10;
d=(a/10)+(c*10);
printf("Reverse value is:%d", d);}
getch();
}
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / .::get lost::.
#include<stdio.h>
#include<conio.h>
void main();
int a;
clrscr();
float rem=0,rev=0;
while(rev>=0)
{
rem=a%10;
rev=rev+rem;
a=a/10;
}
printf(Reverse of two digit no is:=%d",rev);
getch();
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / selvakumar
#include<stdio.h>
#include<conio.h>
void main()
{
int n,a,b=0,c;
printf("\nEnter any number : ");
scanf("%d",&n);
c=n;
while(n!=0)
{
a = n%10;
b = (b*10)+a;
n = n/10;
}
if(b==c)
printf("\nPalindrome no");
else
printf("\nNot a palindrome no");
printf("\nReverse of the number is %d",b);
getch();
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / vaibhav
#include <stdio.h>
#include<conio.h>
void main()
{
int n,t;
printf("\n enter the 2 digit no.");
scanf("%d",&n);
while(n%10>0)
{
t=n%10;
n=n/10;
printf("\n reverse no. is%d",t);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / priya
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
printf("\nEnter Two no. ");
scanf("%d%d",&a,&b);
printf("\nBefore Reverse %d%d",a,b);
printf("\nAfter Reverse %d%d",b,a);
getch();
}
| Is This Answer Correct ? | 2 Yes | 10 No |
main() { char *p; p="Hello"; printf("%c\n",*&*p); }
Do you know the purpose of 'register' keyword?
What is the use of a conditional inclusion statement in C?
Write a program to generate the Fibinocci Series
What is the difference between big endian form and little endian form? write a code to convert big endian form to little endian and vice versa..
What is function prototype in c with example?
Explain the importance and use of each component of this string: Foo.Bar, Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d
Write a program to add the following ¼+2/4+3/4+5/3+6/3+... (Like up to any 12 no.s)
write a program that prints a pascal triangle based on the user input(like how many stages) in an efficient time and optimized code?
WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****
What are linked lists in c?
What is the description for syntax errors?