Computer Science, asked by suhani5869, 1 year ago

plzzz solve this FAST

Attachments:

mananman23: May I write the answer in HTML and JS language?

Answers

Answered by mandaldebankur
0
import java.io.*;
public class CAR
{
public static void main()throws IOException
{
BufferedReader buff=new BufferedReader(new InputStreamReader(System.in));
int a,b;
System.out.print("Enter the car no. : ");
a=Integer.parseInt(buff.readLine());
System.out.print("Enter the no. of hours of parking : ");
b=Integer,parseInt(buff.readLine());
System.out.println("_______________________________________");
if(b<=1)
System.out.println("Parking Fees : Rs.5");
if(b<=3&&b>1)
System.out.println("Parking Fees : Rs."+b*4);
if(b>=4&&(b>3)
System.out.println("Parking Fees : Rs."+b*2);
}
}
Similar questions