Taban ve Üssü Girilen İşlemin Sonucu C#
[code lang=”csharp”]
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 WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int a, b, sayac, sonuc;
sayac = 0;
sonuc = 1;
a = int.Parse(textBox1.Text);
b = int.Parse(textBox2.Text);
ali:
sayac = sayac + 1;
sonuc = sonuc * a;
if (sayac < b) goto ali;
{
MessageBox.Show("Sonuç = " + sonuc);
}
}
}
}
[/code]
