Azra
Bronze Üye
-
- Katılım
- 11 Mart 2014
-
- Mesajlar
- 3.834
-
- Tepkime puanı
- 13
-
- ForumSAL Yaşı:
- 12 yıl 7 ay
- Kıdem:
- Forumun Eskisi
-
- Yaş
- 35
1'den 100'e kadar olan çift sayıların toplamını hesaplayıp gösteren programı yazın.
Kod:
int i;
int toplam = 0;
for (i = 0; i <= 100; i = i + 2) {
toplam += i;
}
System.out.println("1-100 arası Çift sayıların toplamı: " + toplam );