SIDEBAR
»
S
I
D
E
B
A
R
«
İki sayı arasındaki çift sayılar
Temmuz 20th, 2010 by Özcan BAYĞUŞ

static void Main(string[] args)
{
int x;
int y;
int toplam = 0;
Console.WriteLine(“bir sayı girin”);
int input1 = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(“bir sayı daha girin”);
int input2 = Convert.ToInt32(Console.ReadLine());
if (input1 > input2)
{
y = input1;
x = input2;
}
else
{
x = input1;
y = input2;
}
for (int s = x; s <= y; s = s + 1)
{
if (s % 2 == 0)
{
toplam = toplam + s;
}


Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

»  Substance:WordPress   »  Style:Ahren Ahimsa