answersLogoWhite

0

#include
#include
void main()
{
int a,b;
clrscr();
printf("Enter 2 numbers:");
scanf("%d %d",&a,&b);
if(a>b)
printf("%d is greater than %d",a,b);
else
printf("%d is greater than %d",b,a);
getch();
}

User Avatar

Wiki User

15y ago

Still curious? Ask our experts.

Chat with our AI personalities

RafaRafa
There's no fun in playing it safe. Why not try something a little unhinged?
Chat with Rafa
FranFran
I've made my fair share of mistakes, and if I can help you avoid a few, I'd sure like to try.
Chat with Fran
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga
More answers

int largest_digit (int n)

{

int last, tmp;

if (n<10) return n;

last= n/10;

tmp= largest_digit (n/10);

if (last>tmp) tmp= last;

return tmp;

}

User Avatar

Wiki User

15y ago
User Avatar

Add your answer:

Earn +20 pts
Q: C program to find largest digit in a number?
Write your answer...
Submit
Still have questions?
magnify glass
imp