0

Correct me with my code for nested if statement

import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner read = new Scanner(System.in); int purchases = read.nextInt(); if(purchases > 15000){ if(purchases > 30000){ System.out.println("Gift card"); } //complete the code }

3rd Dec 2021, 6:44 AM
Vignesh Waran
Vignesh Waran - avatar
1 Antwort
+ 2
What is it supposed to do? The if-statement already are nested.
3rd Dec 2021, 10:39 AM
Lisa
Lisa - avatar