Eugene0091

Untitled

Oct 29th, 2020
972
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         if (inp == 1) {
  2.             println("you typed 1!");
  3.         } else if (inp == 2) {
  4.             println("you typed 2!");
  5.         } else if (inp == 3) {
  6.             for (i <- 1 to 5) {
  7.                 if (i > 3) {
  8.                     println(0);
  9.                 }
  10.                 else println(inp);        
  11.             }
  12.                                
  13.         }
  14.         else if (inp == 4) {
  15.             var i = 0;
  16.             while (i < 10) {
  17.                 if (i % 2 == 0)
  18.                     println(inp);
  19.                 else println(0);
  20.             }          
  21.         }
  22.         else {
  23.           for (int i = 1; i < 5; ++i) {
  24.             inp match{
  25.                 case 1 => println("123123");
  26.                 case 7 => println("you typed 7!");
  27.                 case _ => println("inp is out of range(1..7)");
  28.             }}
  29.         }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×