Computer Applications

A person is paid ₹350 for each day he works and fined ₹30 for each day he remains absent. Write a program to calculate and display his monthly income, if he is present for 25 days and remains absent for 5 days.

Java

Java Operators

217 Likes

Answer

public class KboatSalary
{
    public static void main(String args[]) {
        int salary = 25 * 350;
        int fine = 5 * 30;
        int netSalary = salary - fine;
        System.out.println("Monthly Income = " + netSalary);
    }
}

Variable Description Table

Program Explanation

Output

Answered By

101 Likes


Related Questions