#include <stdio.h> int main(){ int num , large = 0, rem = 0; scanf("%d" , &num); while (num > 0) { rem = num % 10; if (rem > large) { large = rem; } num = num / 10; } printf("the biggest digit is %d\n", large); return 0; }
while (num > 0)
num = abs(num); while (num > 0)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)