Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  cx
Language: JAVA
Code:
import java.util.Scanner;
class Project {
public static void main(String[] args) {
Scanner myScanner = new Scanner(System.in);
// The title of the program
System.out.println("My Financial Turnover");
// Variables
int monthlyIncome, loanPayment, currentExpenses;
// Code to ask for entering your income
System.out.println("Please enter your monthly income:");
monthlyIncome = myScanner.nextInt();
// Code to ask for entering your loan payment
System.out.println("Please enter your loan payment:");
loanPayment = myScanner.nextInt();
// Code to ask for entering your current expenses
System.out.println("Please enter your durrent expenses:");
currentExpenses = myScanner.nextInt();
// Calculating the remainder
int result = monthlyIncome - (loanPayment +
currentExpenses);
System.out.println("The left over money equals to: " +
result);
}
}



Comments: