babaslavkavelikata's blog

By babaslavkavelikata, history, 5 years ago, In English

include

using namespace std; void hanoi(int n,int A,int C,int B) { if (n==1) { cout<<n<<" "<<A<<" "<<C<<endl; } else { hanoi(n-1,A,B,C); cout<<n<<" "<<A<<" "<<C<<endl; hanoi(n-1,B,C,A); }

} int main() { int n; cin>>n; hanoi(n,1,3,2); return 0; }

Read more »

 
 
 
 
  • Vote: I like it
  • -22
  • Vote: I do not like it

By babaslavkavelikata, history, 5 years ago, In English

include

include

using namespace std; int main() { int a,b; scanf("%d%d",&a,&b); std::cout<<a+b<<"\n"; }

Read more »

 
 
 
 
  • Vote: I like it
  • -31
  • Vote: I do not like it

By babaslavkavelikata, history, 5 years ago, In English

a school

Read more »

 
 
 
 
  • Vote: I like it
  • -29
  • Vote: I do not like it

By babaslavkavelikata, history, 5 years ago, In English
 
 
 
 
  • Vote: I like it
  • -31
  • Vote: I do not like it

By babaslavkavelikata, history, 5 years ago, In English

If a is 2 and b is 2 so c is 4.

Read more »

 
 
 
 
  • Vote: I like it
  • -22
  • Vote: I do not like it