Sunday, May 12, 2013

climbing worm program in c++


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

Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com


Stuff I use to make videos

Windows notebook - http://amzn.to/2ADOPrW

Apple MacBook Pro - http://amzn.to/2AC0WG2

Microphone - http://amzn.to/2AC1kV0

notebook mouse - http://amzn.to/2BmeZ2d