Convert the following pseudocode to Java code. Be sure to declare the appropriate variables:
store 2000.50 in expenses variable
store 10000.0 in revenue variable
subtract expenses from revenue and
store the result in netIncome variable.
Display the results
//TestCode.java public class TestCode { public static void main(String[] args) { // store 2000.50 in expenses variable double expenses = 2000.50; // store 10000.0 in revenue variable double revenue = 10000.0; // subtract expenses from revenue and // store the result in netIncome variable. double netIncome = revenue - expenses; // Display the results System.out.println(netIncome); } }
Get Answers For Free
Most questions answered within 1 hours.