Skip to content

Instantly share code, notes, and snippets.

@blackghostt
Created March 5, 2015 21:23
Show Gist options
  • Save blackghostt/fae5a83d2f26a56fc7cc to your computer and use it in GitHub Desktop.
Save blackghostt/fae5a83d2f26a56fc7cc to your computer and use it in GitHub Desktop.
PruebaSgfGlobalManuelSilva
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace PruebaSgfGlobalManuelSilva
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
for (int i = 1; i < 101; i++)
{
Comparar(i);
}
MessageBox.Show("Listo");
}
public void Comparar(int n)
{
if (n % 3 == 0)
{
if (n % 5 == 0)
{
//textBox1.Text = textBox1.Text + System.Environment.NewLine + "FuzzBazz ";
System.Diagnostics.Debug.WriteLine("FuzzBazz ");
}
else
{
//textBox1.Text = textBox1.Text + System.Environment.NewLine + "Bazz ";
System.Diagnostics.Debug.WriteLine("Bazz");
}
}
else
{
//nada
//textBox1.Text += textBox1.Text + System.Environment.NewLine + n.ToString();
if (n % 5 == 0)
{
//textBox1.Text = textBox1.Text + System.Environment.NewLine + "Fuzz ";
System.Diagnostics.Debug.WriteLine("Fuzz");
}
else
{
System.Diagnostics.Debug.WriteLine(n.ToString());
}
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment