+ 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); } }
2 Respostas
+ 2
Thank u so much