Değişkenlere kendi atadığımız iki sayının toplamını bulan C# programını yazacağız.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ikisayinintoplamı
{
class Program
{
static void Main(string[] args)
{
int x, y;
x = 7;
y = 5;
int toplam;
toplam = x + y;
Console.WriteLine(toplam);
Console.ReadLine();
}
}
}
Sonraki Ders: C# Üç Sayının Toplamı |