Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * File: main.cpp
- * --------------
- * This is a blank C++ source file.
- */
- #include <iostream>
- #include "console.h"
- #include "simpio.h"
- #include <limits.h>;
- using namespace std;
- bool raghaca(int k);
- int main() {
- // int sum=0;
- // int min=INT_MAX;
- // int max=INT_MIN;
- // int raodenoba=0;
- // cout << "Hello world!" << endl;
- // while(true){
- // int x=getInteger();
- // if(x==-1){
- // break;
- // }
- // if(x!=-1){
- // sum+=x;
- // }
- // if(x>max){
- // max=x;
- // }
- // if(x<min){
- // min=x;
- // }
- // raodenoba++;
- // }
- // int sashualo=sum/raodenoba;
- // cout<<max<<endl;
- // cout<<min<<endl;
- // cout<<sashualo<<endl;
- //meore//
- //int x=getInteger();
- // if(x%2==0){
- // if(raghaca(x)){
- // cout<<"ki brat"<<endl;
- // }
- // }else{
- // cout<<"ara brad"<<endl;
- //
- // }
- return 0;
- }
- bool raghaca(int k){
- if(k==1)
- return true;
- if(k%2==1)
- return false;
- return raghaca(k/2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement