using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
float a, x, wynik;
try
{
a = Convert.ToSingle(textBox1.Text);
x = Convert.ToSingle(textBox2.Text);
wynik = 1;
if (x > 0)
for (int i = 1; i <= x; i++)
wynik = wynik * a;
else
for (int i = 1; i <= -x; i++)
wynik = wynik * 1 / a;
textBox3.Text = wynik.ToString();
}
catch
{
MessageBox.Show("ERROR");
}
}
}
}