Quick actions

cmd+k|ctrl+k

Navigation

Languages

C# Zengin sayıları bulma

Snippet info

Language

Csharp

Visibility

public

Author

etapsoft

Created

2017-01-25T11:46:20Z

Updated

2017-01-25T11:49:14Z

using System;

class MainClass {
    static void Main() {
        
        int baslangic =1;
        int bitis = 1000; /*Başlangıç ve bitiş değerleri*/
        int toplam =0; /*Sayıların toplam değeri*/
        
        for (int i = baslangic; i <= bitis; i++)
           {
               toplam=0;
               for (int x = 1; x < i; x++)
               {
                   if (i % x == 0)
                   {
                       toplam += x;
                   }
               }
                if (toplam > i)
                   {
                       Console.WriteLine(i.ToString());
                   }
               
           }
    }
}
/*Muhammet Bozdağ*/
INFO