Etiket: csharp

  • 1’den 1000’e

    using System;using System.Collections.Generic;using System.Linq;using System.Text.RegularExpressions; /Please dont change namespace, Dcoder and class must not be public/ //Compiler version 4.0, .NET Framework 4.5 namespace Dcoder{public class Program{public static void Main(string[] args){//Your code goes hereint L;int Toplam = 0;int Sayac = 0;for (L=0; L<=1000; L+=5){Console.WriteLine(“{0}.Sayi:{1}”, Sayac,L);Toplam=Convert.ToInt32(Toplam + L);Sayac +=1;}Console.WriteLine(Toplam);}}}

  • 1’den 1000’e for Döngüsü

    using System;using System.Collections.Generic;using System.Linq;using System.Text.RegularExpressions; /Please dont change namespace, Dcoder and class must not be public/ //Compiler version 4.0, .NET Framework 4.5 namespace Dcoder{public class Program{public static void Main(string[] args){//Your code goes hereint L;int Toplam = 0;for (L=0; L<=1000; L+=5){Console.WriteLine(L);Toplam=Convert.ToInt32(Toplam + L);}Console.WriteLine(Toplam);}}}

  • 1’den 1000’e Beşerli Sayma

    using System;using System.Collections.Generic;using System.Linq;using System.Text.RegularExpressions; /Please dont change namespace, Dcoder and class must not be public/ //Compiler version 4.0, .NET Framework 4.5 namespace Dcoder{public class Program{public static void Main(string[] args){//Your code goes herefor (int s = 0; s <= 1000; s=s+5){Console.WriteLine(s.ToString());}}}}