Skip to content

Instantly share code, notes, and snippets.

@geekykant
Created March 29, 2020 05:13
Show Gist options
  • Save geekykant/68e8a54f0a054b771821d88011411995 to your computer and use it in GitHub Desktop.
Save geekykant/68e8a54f0a054b771821d88011411995 to your computer and use it in GitHub Desktop.
#include<iostream>
using namespace std;
int a,b,c;
int not_odd(){
a = (a+b)/2;
b = (b+c)/2;
c = (c+a)/2;
if(a%2 ==0 || b%2==0 | c%2 ==0){
return 1;
}
return 0;
}
int main()
{
cin>>a>>b>>c;
int inc = 0;
while(not_odd()){
inc++;
}
cout<<inc;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment