Get Answers to all your Questions

header-bg qa

Write a program to input any digit number and print the reverse of that digit usinggoto statement.?

Answers (1)

best_answer

#include<stdio.h>

#include<conio.h>
void main()

                                                   

int a,c,d;

b=0;                                                

clrscr();

printf("Enter the value of a/n ");

scanf(" 0 , &a");

d=a ;                                            

BEGIN:  c=a%10                                                                                                         

b=(b*10)+c;

a=a/10;                                              

if(a>0)

goto BEGIN;                                    

printf(" Input Number=0/n" , d);

printf(" Reversed Number=0/n" , b)
                                                          

Posted by

Deependra Verma

View full answer