Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(){
- int n = 132;
- int najgolema_cifra = 0; // 3
- while(n > 0) { // 0
- int cifra = n % 10; // 1
- n /= 10;
- if(najgolema_cifra < cifra) {
- najgolema_cifra = cifra;
- }
- }
- printf("%d\n", najgolema_cifra);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement