Re: Easy Euphoria a Fairy tale

new topic     » goto parent     » topic index » view thread      » older message » newer message

By the way, this could have been written up in the Wiki using creole markup rather than HTML.

Anyhow ... here is a more generic (and nicer?) version of the final code blink

include std/console.e 
integer a = 3 
integer b = 5 
integer c = 100 
 
for i = 1 to c do  
	if    remainder(i,a * b) = 0 then display("FizzBuzz") 
	elsif remainder(i,a) = 0     then display("Fizz") 
	elsif remainder(i,b) = 0     then display("Buzz") 
	else                              display(i) 
	end if 
end for 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu