Facebook
From Colossal Shama, 3 Years ago, written in C.
Embed
Download Paste or View Raw
Hits: 110
  1. int main()
  2. {
  3.     int sayi;
  4.     int toplam= 0;
  5.     for(int a = 1;a<=9;a++){
  6.         for(int b = 0; b<=9;b++){
  7.  
  8.             for(int c = 0; c<=9;c++){
  9.                 sayi = a*100+b*10+c;
  10.                 int modUc = (a+b+c)%3;
  11.                 if(modUc==0&&b == 8){
  12.                     printf("Sayi = %d \n",sayi);
  13.                     toplam = toplam+sayi;
  14.                 }
  15.             }
  16.         }
  17.     }
  18.     printf("Toplam = %d", toplam);
  19.     return 0;
  20. }