Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
int x=10;
switch(x)
{
case 10:
println("x is the same as 10");
break;
case 9:
println("x is the same as 9");
break;
case 8:
println("x is the same as 8");
break;
default:
println("x is the same as 10,9 or 8");
break;

Exercise

...

 5

Programm a drawing app. The color can be changed with the buttons '1' - '5'. The left mouse button is draws and the right mouse button is used to erase it.