Computer Science, asked by swethasureddy5800, 1 year ago

A shopkeeper offers 10% discount on the printed price of digital camera our customer has to pay 6% of GST on remaining amount write a program in Java to calculate the amount to be paid by customer taking the printer prices as an input

Answers

Answered by qwtiger
112

Answer:

A shopkeeper offers 10% discount on the printed price of digital camera our customer has to pay 6% of GST on remaining amount.

Explanation:

   import java.io.*;

public class Q2  

{   public static void main(String args[])throws IOException

{

InputStreamReader read =new InputStreamReader(System.in);

BufferedReader in =new BufferedReader(read);

double a;

double dis,ra,st,pa;

System.out.println(“Enter the marked price of the camera”);

a=Double.parseDouble(in.readLine());

dis=30.0/100.0*a;

ra=a-dis;

st=6.0/100.0*a;

pa=ra+st;

System.out.println(“paid amount=”+pa);

}

}

Answered by shivanikhosmane73
6

import java.io.*;

public class Q2  

{   public static void main(String args[])throws IOException

{

InputStreamReader read =new InputStreamReader(System.in);

BufferedReader in =new BufferedReader(read);

double a;

double dis,ra,st,pa;

System.out.println(“Enter the marked price of the camera”);

a=Double.parseDouble(in.readLine());

dis=30.0/100.0*a;

ra=a-dis;

st=6.0/100.0*a;

pa=ra+st;

System.out.println(“paid amount=”+pa);

Similar questions