+ 3

What's the problem???

import java.util.*; public class Ggg { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("please enter an enteger: "); int n = input.nextInt(); String type; if (n % 2 == 0); { type = "even"; } else { type = "odd"; } System.out.format("the number %d is %s \n",n ,type); } }

4th Jan 2021, 7:23 PM
Amateur
2 Respostas
+ 2
Thank u so much
5th Jan 2021, 1:38 AM
Amateur