simple c program for 12345 convert 54321 with out using string

Answer Posted / abhradeep chatterjee

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
printf("enter a number");
scanf("%d",&i);
for(int n=1;n<=5;n++)
{
j=i%10;
i=i/10;
printf("%d",j);
}
getch();
}

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is I ++ in c programming?

851


Write a program on swapping (100, 50)

856


What is the explanation for modular programming?

896


What is a substring in c?

777


What is pass by reference in functions?

516


In c language can we compile a program without main() function?

810


Is c a great language, or what?

835


How to Throw some light on the splay trees?

791


Explain what are its uses in c programming?

785


Write a program to print numbers from 1 to 100 without using loop in c?

842


what is different between auto and local static? why should we use local static?

864


How can I insert or delete a line (or record) in the middle of a file?

772


Define Array of pointers.

820


Define VARIABLE?

892


Calculate 1*2*3*____*n using recursive function??

1735