Computer Science, asked by ADITYAAGARWAL1711199, 2 months ago

A shopkeeper offers 20% discount on the printed price of a digital camera. However, a customer has to pay 18% GST on the remaining amount. Write a program in java to calculate the amount to be paid by the customer. Assign the printed price of the camera.

Answers

Answered by Muskan402255
1

Answer:

import java.util.Scanner;

public class KboatCameraPrice

{

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

System.out.println("Enter printed price of Digital Camera:");

double mrp = in.nextDouble();

double disc = mrp * 10 / 100.0;

double price = mrp - disc;

double gst = price * 6 / 100.0;

price += gst;

System.out.println("Amount to be paid: " + price);

Explanation:

please Mark me as a brainliest and follow

Similar questions