I have the following code :
do{
Console.Write("Please Input a Value: ");
userInput = Console.ReadLine();
v = userInput.ToString().Substring(0, 1);
amount = Convert.ToInt32(userInput.ToString().Substring(1, 1));
switch(v)
{
case "a": mother.incr1(amount);
case "s": mother.incr10(amount);
case "d": mother.incr100(amount);
case "f": mother.incr1000(amount);
case "=": Console.WriteLine("The total amount is: {0} \n", mother.current);
case "r": mother.current = 0;
}
}while(mother.overflow() != true);
when I added the do while, it returned an error “control cannot fall through from one case label #caselabelname# to another” on all the case lines
You need to put a “break;” between each statement