SIDEBAR
»
S
I
D
E
B
A
R
«
Girilen sayının negatif mi pozitif mi olduğunu bulan program
Temmuz 20th, 2010 by Özcan BAYĞUŞ

static void Main(string[] args)
{
Console.WriteLine(“girilen sayının negatif veya pozitif olduğunu bulan”);
int x = Convert.ToInt32(Console.ReadLine());
if (x >= 0)
{
Console.WriteLine(“girilen sayı pozitiftir”);
}
else
{
Console.WriteLine(“girilen sayı negatif”);
}
Console.ReadLine();
}
}
}

girilen x değerini 5 kere ekrana yazdırma

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace x_değerini_5_kere_yazdır
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(“x değerini 5 kez ekrana yazdır”);
int sayi = Convert.ToInt32(Console.ReadLine());
for (int index = 0; index < 5; index++)
{
Console.WriteLine(sayi);
}
Console.ReadLine();
}
}
}


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