New course! Every coder should learn Generative AI!
Try a free lesson0
Whats wrong with my code
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); //your code goes here for(i=0;i<6;i++){ payment=((10*amount)/100); } amount=amount-payment; } System .out.println(amount); }
3 Answers
0
payment is not declared, and logic is bad: you are supposed to update amount at each iteration ;)
0
Thanksš
0
Am a beginner have mercy š