Arşiv
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DongulerWhile3 { class Program { static void Main(string[] args) { int altSinir, ustSinir; Console.Write(“Alt : “); altSinir = Convert.ToInt32(Console.ReadLine()); Console.Write(“Ust : “); ustSinir = Convert.ToInt32(Console.ReadLine()); int bolenleriToplami; while (++altSinir<ustSinir) { bolenleriToplami = 0; int araSayi = 1; while (araSayi<altSinir)//altSinir 3 olsun. araSayi bize 1 ve 2 [...]
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DongulerWhile2 { class Program { static void Main(string[] args) { int altSinir, ustSinir; Console.Write(“Alt : “); altSinir = Convert.ToInt32(Console.ReadLine()); Console.Write(“Ust : “); ustSinir = Convert.ToInt32(Console.ReadLine()); bool bolenVarMi; while (++altSinir<ustSinir) { bolenVarMi = false; int araSayi = 1; while (++araSayi<altSinir) { if (altSinir % araSayi == 0) [...]
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DongulerWhile1 { class Program { static void Main(string[] args) { int i = 1; while (i<11) { Console.WriteLine(i); i++; } Console.ReadKey(); } } }
Son Yorumlar