Toplam 1 adet sonuctan sayfa basi 1 ile 1 arasi kadar sonuc gösteriliyor
-
30.Kasım.2014, 17:29 #1
Try – Catch Kullanarak Ortalama Hesaplama C#
Try – Catch kullanarak ortalama hesaplama C#
Kod:
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
int not1, not2, not3;
double ortalama;
try
{
not1 = int.Parse(textBox1.Text);
not2 = int.Parse(textBox2.Text);
not3 = int.Parse(textBox3.Text);
ortalama = (not1 + not2 + not3) / 3;
textBox4.Text = ortalama.ToString();
}
catch (Exception hata)
{
MessageBox.Show("Hata Meydana Geldi \n" + hata.Message, "Dikkat");
}
}
private void button2_Click(object sender, EventArgs e)
{
Close();
}
private void button3_Click(object sender, EventArgs e)
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
}
}
}
Konu Bilgileri
Bu Konuya Gözatan Kullanıcılar
Şu anda 1 kullanıcı bu konuyu görüntülüyor. (0 kayıtlı ve 1 misafir)
Benzer Konular
-
PHP KDV Hesaplama Fonksiyonu
Konu Sahibi optimusprime Forum PHPCevap: 0Son Mesaj : 12.Ağustos.2015, 07:32 -
Php ve Ajax Kullanarak Kalan Süreyi Göstermek
Konu Sahibi megatron Forum PHPCevap: 0Son Mesaj : 27.Temmuz.2015, 11:17 -
Halt and Catch Fire
Konu Sahibi F.L.WRIGHT Forum DizilerCevap: 0Son Mesaj : 16.Temmuz.2015, 00:30 -
Vb.NET'te Kombinasyon Hesaplama
Konu Sahibi donjuanhose81 Forum .Net ProgramlamaCevap: 0Son Mesaj : 07.Nisan.2015, 07:42 -
Çinli güvenlik ekibi, Safari'nin açığını kullanarak sisteme sızmayı başardı
Konu Sahibi WeBMasteR Forum GüvenlikCevap: 0Son Mesaj : 19.Mart.2014, 15:55
Shopsocks5 - Service Socks5 Cheap...
11.Mayıs.2024, 15:00 in Güvenlik