write a program to input an integer and print the largest digit
Answers
Answered by
0
Answer:
C program to find largest digit of a number
int num, large = 0, rem = 0; /* get the input from the user */ printf("Enter your input value:");
scanf("%d", &num); /* finding the largest digit of the given input */ while (num > 0) {
rem = num % 10; if (rem > large) { large = rem; ...
} /* print the largest digit of the number */
Similar questions