Created
April 18, 2022 19:45
-
-
Save Furkan-Gulsen/4032d27f1bdcd98d6db42172d27b549c 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 Giris; | |
import java.util.Scanner; | |
public class Baslangic { | |
public static void main(String args[]) { | |
Scanner input = new Scanner(System.in); | |
int a, total = 0; | |
do{ | |
System.out.print("Enter a number: "); | |
a = input.nextInt(); | |
if(a % 4 == 0){ | |
total += a; | |
} | |
}while( !(a % 2 == 1)); | |
System.out.println("Result: " + total); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment