Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class CreditLimitCalculator {
- public static void main(String[] args) {
- Scanner input = new Scanner(System.in);
- int accountNumber = 12;
- int balanceBeginning = 100;
- System.out.println("Enter credit");
- int moneyWanted = input.nextInt() ;
- int totalCharged = balanceBeginning + moneyWanted;
- int totalAplied;
- int allowedCredit = 1000;
- int newBalance;
- if (moneyWanted <= allowedCredit)
- {
- newBalance = totalCharged;
- System.out.println("New balance is " + newBalance);
- }
- else
- {
- System.out.println("Your credit exseeds your balance.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement