



Código:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace programameter30catacteres
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int c,n, p=0, i=0,r;
n = System.Int32.Parse(textBox1.Text);
for (c = 1; c > 3; c++)
{
r = n % 2;
if (r == 0)
{
p += 1;
textBox2.Text = p.ToString ();
}
else
i += 1;
textBox3.Text = i.ToString();
}
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace programameter30catacteres
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int c,n, p=0, i=0,r;
n = System.Int32.Parse(textBox1.Text);
for (c = 1; c > 3; c++)
{
r = n % 2;
if (r == 0)
{
p += 1;
textBox2.Text = p.ToString ();
}
else
i += 1;
textBox3.Text = i.ToString();
}
}
}
}