write a java program to accept quantity of pens and price per pen using inputstreamreader, find total bill with 8% GST.
Answers
import java.io.*;
class pens
{
void main() throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("Enter no of pens: ");
int i=Integer.parseInt(br.readLine());
System.out.print("enter the price of each pen ");
int j=Integer.parseInt(br.readLine());
int gst=8,bill=0,total=1,tax;
total=i*j;
tax=(total)*8/100;
bill=total+tax;
System.out.println("the percentage of gst is "+gst);
System.out.println("the tax to be payed by the customer is "+tax);
System.out.println("the total amount to be payed by the customer is "+bill);
}
}
i hope this answer helps you
please mark it as the brainliest :)