object Main extends App{for(x<-1 to 50)print((x%3,x%5)match{case(0,0)=>"FIZZBUZZ"case(0,_)=>"fizz"case(_,0)=>"buzz"case _=>x})}
Standard input is empty
12fizz4buzzfizz78fizzbuzz11fizz1314FIZZBUZZ1617fizz19buzzfizz2223fizzbuzz26fizz2829FIZZBUZZ3132fizz34buzzfizz3738fizzbuzz41fizz4344FIZZBUZZ4647fizz49buzz
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!