Notes
![]() ![]() Notes - notes.io |
for (int sayac1 = 2; sayac1 <= 100; sayac1++)
{
int k = 0;
for (int sayac2=2; sayac2 < sayac1; sayac2++)
{
if (sayac1 % sayac2 == 0)
{
k = 1;
break;
}
if (k == 0)
{
Console.Write("{0} asal sayıdır.", sayac1);
}
}
Console.ReadLine();
*/
/* dışarıdan girilen sayının asal olup olmadığını bulan program
int sayi,sayac=0;
Console.Write("bir sayı giriniz :");
sayi = Convert.ToInt16(Console.ReadLine());
for(int i=2; i<sayi; i++)
{
if(sayi%i==0)
{
sayac++;
}
}
if(sayac==0)
{
Console.Write("girilen sayı asal");
}
else
{
Console.Write("girilen sayı asal değil");
}
Console.ReadLine();
}
*/
//klavyeden girilen sayı tekse 5 kere çiftse 10 kere sayıyı yazdıran program //
/*
int sayi;
Console.Write("sayı giriniz : ");
sayi = Convert.ToInt16(Console.ReadLine());
if(sayi%2==0)
{
for(int i=0; i<=10; i++)
{
Console.WriteLine(sayi);
}
}
else
{
for(int i=0; i<5; i++)
{
Console.WriteLine(sayi);
}
}
Console.ReadLine();
}
*/
// tekse 5 sayı daha isteyip toplayacak çiftse 3 tane daha sayı isteyip toplayacak //
/*
int sayi,toplam=0;
Console.Write("sayı giriniz : ");
sayi = Convert.ToInt16(Console.ReadLine());
if(sayi%2==0)
{
for (int i = 0; i<3; i++)
{
Console.WriteLine("tekrar sayı giriniz : ");
int a = Convert.ToInt16(Console.ReadLine());
toplam = a + toplam;
}
Console.Write("toplam : " +toplam);
}
else
{
for(int i =0; i<5; i++)
{
Console.WriteLine(" sayı giriniz : ");
int b = Convert.ToInt16(Console.ReadLine());
toplam = b + toplam;
}
Console.Write(toplam);
}
Console.ReadLine();
*/
/* taban ve üst değeri klavyeden girilen sayıyı ekrana yazdıran program
int sonuc = 1;
Console.Write("taban giriniz : ");
int taban = Convert.ToInt16(Console.ReadLine());
Console.Write("üst değeri giriniz : ");
int ust = Convert.ToInt16(Console.ReadLine());
for(int i=1;i<=ust;i++)
{
sonuc = taban * sonuc;
}
Console.Write(sonuc);
Console.ReadLine();
*/
// bir satranç tahtasında fibonacci //
/*
int sayi, a = 1, b = 1,c=0;
Console.Write("sayı giriniz : ");
sayi = Convert.ToInt16(Console.ReadLine());
Console.Write(a);
Console.Write(b);
for (int i=3; i<=sayi;i++)
{
c = a + b;
Console.Write(c);
a = b;
b=c;
}
Console.ReadLine();
*/
/*
int i=0;
while (i<5)
{
Console.WriteLine("Hilal ");
i++;
}
Console.ReadLine();
*/
//faktöriyeli bulan //
/*
int sonuc = 1;
Console.Write("bir sayı giriniz: ");
int sayi = Convert.ToInt32(Console.ReadLine());
while (sayi > 1)
{
sonuc = sayi * sonuc;
sayi--;
}
Console.Write("sonuc: " + sonuc);
Console.ReadLine();
*/
// dışarıdan girilen 5 sayının toplamını ekrana yazdıran //
/*
int sayac=0,sonuc=0,sayi;
while (sayac < 5)
{
Console.Write("sayi giriniz : ");
sayi = Convert.ToInt16(Console.ReadLine());
sonuc = sayi + sonuc;
sayac++;
}
Console.Write(sonuc);
Console.ReadLine();
*/
// klavyeden girilen sayı 0 olana kadar sürekli yeni sayı isteyen 0 girilince programı kapatan //
/*
int sayi=1;
while (sayi!=0)
{
Console.Write("sayı giriniz : ");
sayi = Convert.ToInt16(Console.ReadLine());
}
Console.Write("sayı sıfırdır");
Console.ReadLine();
*/
//kullanıcı adı ve şifre doğru girilene kadar tekrar tekrar soran program //
string kullaniciadi = "hilal", sifre = "oguzhan";
string girilenkullanici = "", girilensifre="";
while (kullaniciadi != girilenkullanici || sifre != girilensifre)
{
// Console.Write("yanlış kullanıcı adı veya şifre girdiniz ");//
Console.Write("kullanıcı adı giriniz : ");
girilenkullanici = Console.ReadLine();
Console.Write("şifre giriniz : ");
girilensifre = Console.ReadLine();
}
Console.Write("giriş başarılı ");
Console.ReadLine();
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team