0
what is wrong in this program?
import java.util.Scanner; public class Main { public static void main(String[] args) } Scanner read = new Scanner(System.in); System.out.println("Enter a value"); int num = read.nextInt(); int a = 10 ; int b = 9 ; int c = 4 ; int d = 6; if (a%num == 0 && b%num ==0);{ System.out.println("you won $200"); } if (c%num ==0 && d%num ==0);{ System.out.println("you won $50"); } else { System.out.println("try again"); }
2 odpowiedzi
+ 2
Your code is imcomplete, it's truncated due to character limits. Save your code in SoloLearn and share the saved code link in the Description ☝
Follow this guide to sharing links 👇
https://www.sololearn.com/post/75089/?ref=app