Created
November 15, 2018 08:32
-
-
Save canokay/3e026771b8f0726810e491fc5190a890 to your computer and use it in GitHub Desktop.
Java Do While Example
This file contains hidden or 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
public class DoWhileExample { | |
public static void main(String[] args) { | |
int toplam=0; | |
int i=0; | |
do{ | |
if(i%2==0){ | |
toplam+=i; | |
} | |
i++; | |
}while(i<=10); | |
System.out.println("(10 dahil)10'a kadar olan çift sayilar toplami: "+toplam); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment