help! java is really confusing :/ idk where did this thing (amount-=pay;) came from besides, i have no idea how to use it++ :<
/* since every quiz here are all difficult compared to the first discussion i've learned and quite far to each other. can someone help and explain it to me what is it for?(i'm basically have low knowledge when it comes to math) TIA :) */ import java.util.Scanner; public class ivor{ public static void main(String[]args){ Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); int month= 1; while(month<=3){ int pay= amount/10*1; amount-=pay; month++; } System.out.println(amount); } } /* for loop Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); int month = 1; for(month = 1; month<= 3; month++){ int pay= amount/10*1; amount-=pay; } System.out.println(amount); */