Pozdrav, imam problem sa greskom u kodu? Kako da resim to?
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 multiplicationGUI
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int userInput;
userInput = Convert.ToInt32(txtUserInput);
lblResults.Text = MultiplicationTable(userInput);
}
private void MultiplicationTable(int input)
{
int[] numbers = {2,3,4,5,6,7,8,9,10};
for (int x = 0; x < numbers.Length; x++)
{
int results;
results = input*(numbers[x]);
Console.WriteLine("{0} X {1} = {2}", input.ToString("N0"), numbers[x].ToString("N0"), results.ToString("N0"));
}
}
private void btnExit_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
|