Previous
0 / 15
Module DEMO-33-63DEMO-OOP-33

Net Salary With Tax

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Read gross salary, tax rate, and bonus, then print the tax amount and net salary.

Input Format

Input is given as whitespace-separated tokens in this order:

  1. gross salary
  2. tax rate
  3. bonus

Output Format

Print the exact report in this order:

  1. Tax
  2. Net

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
1000.0
10.0
50.0
Tax: 100.00
Net: 950.00
Input: gross salary = 1000.0, tax rate = 10.0, bonus = 50.0.
Key calculation(s): taxValue = 1000.0 * (10.0 / 100.0) | net = 1000.0 - taxValue + 50.0 | "Tax: " + String.format("%.2f", taxValue) = "Tax: 100.00".
Output:
Tax: 100.00
Net: 950.00
Sample #2
Public sample
750.0
5.5
0.0
Tax: 41.25
Net: 708.75
Input: gross salary = 750.0, tax rate = 5.5, bonus = 0.0.
Key calculation(s): taxValue = 750.0 * (5.5 / 100.0) | net = 750.0 - taxValue + 0.0 | "Tax: " + String.format("%.2f", taxValue) = "Tax: 41.25".
Output:
Tax: 41.25
Net: 708.75

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings