Sunday, May 12, 2013

climbing worm program in c++

11:55 AM


C++ Worm Code





#include 
using namespace std;


int main()
{
int n,d,u,ians;
while(cin>>n>>u>>d && (n!=0))
{
ians=0;
while(n-u>0)
{
n=n-u+d;
ians+=2;
}
ians++;
cout<<ians<<endl;
}
return 0;
}


-------------------------------------
C++ Worm Code
(Climbing Worm) | Solved Programming Problems

Written by

We are one of the initiators of the development of information technology in understanding the need for a solution that is familiar and close to us.

0 comments:

Post a Comment

 

© 2013 Klick Dev. All rights resevered.

Back To Top