Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <ctype.h>
- #include <math.h>
- int rek(int broj) {
- while(broj > 9) {
- int posledna = broj % 10;
- int pretposledna = (broj / 10) % 10;
- if(pretposledna >= posledna) {
- return 0;
- }
- broj /= 10;
- }
- return 1;
- }
- int main(int argc, char * argv[]) {
- int n;
- scanf("%d", &n);
- printf("%d\n", rek(n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement