Full width home advertisement

HTML

Tech News

Ad

Write a c program to print the accepted number and its reverse number 



#include <stdio.h>
#include <conio.h>

void main()
  {
	int a, i, n;
	clrscr();
	printf("Enter the no: ");
	scanf("%d", &n);
	printf("reverse no is: ");
	for (i = 1; i <= 100; i++)
	{
		a = n % 10;
		printf("%d", a);
		n = n / 10;
		if (n <= 0)
			goto p;
	}
	p:
	getch();
  }

thank you for visiting seeya again

No comments:

Post a Comment

Bottom Ad [Post Page]