Skip to content

Instantly share code, notes, and snippets.

View Ralphbaer's full-sized avatar
Coding

Cleverson Soares Ralphbaer

Coding
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication6
{
class Program
{
@Ralphbaer
Ralphbaer / fizzbuzz.py
Last active August 29, 2015 14:26
The problem required "Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”. So:
for x in range(1, 101):
y = ""
if x % 3 == 0:
y += "Fizz"
if x % 5 == 0:
y += "Buzz"
if y == "":
y = x
print y