99 Bottles to fall....how many loops to call?
This simple challenge was posed as a programming question.....
If there are 99 bottles on a wall and one by one they have to be removed how many loops are required?
Sample code....
int number = 99
While (number > 1)
{
number -=1;
Console.Writeline(number.ToString() + ‘ bottles are left’);
}
This simple challenge was posed as a programming question.....
If there are 99 bottles on a wall and one by one they have to be removed how many loops are required?
Sample code....
int number = 99
While (number > 1)
{
number -=1;
Console.Writeline(number.ToString() + ‘ bottles are left’);
}
  |
Comments