Created
September 4, 2020 12:34
-
-
Save mrnirva/86e55d3b2fe9bc974e8c89c908c09c54 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package donguler; | |
public class Donguler { | |
public static void main(String[] args) { | |
// Do - While Döngüsü | |
int sayi = 0; | |
do{ | |
System.out.println("Merhaba Dünya"); | |
}while(sayi > 5); | |
System.out.println("****************"); | |
// 0'dan 100'e kadar sayıların toplamı | |
int sayac = 0, toplam = 0; | |
do{ | |
sayac++; | |
toplam += sayac; | |
}while(sayac <= 100); | |
System.out.println("Toplam: "+toplam); | |
// Çıktı: 5151 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment