Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int opagacki_red(int broj){
- if(broj<10){
- return 1;
- }
- int a=broj%10;
- int b=(broj/10)%10;
- if(b>a){
- return opagacki_red(broj/10);
- }
- else{
- return 0;
- }
- }
- int main()
- {
- int n;
- cin>>n;
- for(int i=0; i<n; i++){
- int broj;
- cin>>broj;
- cout<<opagacki_red(broj)<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement