mburaktekin
Hectopat
- Katılım
- 10 Eylül 2020
- Mesajlar
- 4.964
- Makaleler
- 2
- Çözümler
- 11
Daha fazla
- Cinsiyet
- Erkek
Ben C#'ı çğrenmeye başladım. İlk önce bir program yazacağım ve öğrendiklerimi o program üzerinde uygulayarak hem kendimi hem de programı geliştireceğim. Bir öğrenci kayıt programı yazıyorum ve bu programa ad yerine sayi girildiğinde hata veren bir özellik yapmak istiyorum. Kodu aşağıya bıraktım. Şu playlistte "If-Else yapısı 1" adlı videoya kadar izledim. Mümkün olduğunca basit anlatırsanız sevinirim.
Kodum da bu:
[CODE lang="csharp" title="Program"]using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
string ad, soyad, numara;
int not1, not2, proje;
double ort;
Console.Write("İsminizi giriniz: ");
ad = Console.ReadLine();
Console.Write("Soyisminizi giriniz: ");
soyad = Console.ReadLine();
Console.WriteLine("****NOT GIRISI****");
Console.Write("1. Notu giriniz: ");
not1 = Convert.ToInt16(Console.ReadLine());
Console.Write("2. Notu Giriniz: ");
not2 = Convert.ToInt16(Console.ReadLine());
Console.Write("Proje Notunu Giriniz: ");
proje = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("***NOT BILGILERI***");
ort = (not2 + not1 + proje)/4;
Console.WriteLine("1. Not: " + not1);
Console.WriteLine("2. Not: " + not2);
Console.WriteLine("Proje Notu: " + proje);
Console.WriteLine("Ortalama: "+ ort);
Console.Read();
}
}
}
[/CODE]
Kodum da bu:
[CODE lang="csharp" title="Program"]using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp3
{
class Program
{
static void Main(string[] args)
{
string ad, soyad, numara;
int not1, not2, proje;
double ort;
Console.Write("İsminizi giriniz: ");
ad = Console.ReadLine();
Console.Write("Soyisminizi giriniz: ");
soyad = Console.ReadLine();
Console.WriteLine("****NOT GIRISI****");
Console.Write("1. Notu giriniz: ");
not1 = Convert.ToInt16(Console.ReadLine());
Console.Write("2. Notu Giriniz: ");
not2 = Convert.ToInt16(Console.ReadLine());
Console.Write("Proje Notunu Giriniz: ");
proje = Convert.ToInt16(Console.ReadLine());
Console.WriteLine("***NOT BILGILERI***");
ort = (not2 + not1 + proje)/4;
Console.WriteLine("1. Not: " + not1);
Console.WriteLine("2. Not: " + not2);
Console.WriteLine("Proje Notu: " + proje);
Console.WriteLine("Ortalama: "+ ort);
Console.Read();
}
}
}
[/CODE]
Son düzenleyen: Moderatör: