plzzz solve this FAST
Attachments:
mananman23:
May I write the answer in HTML and JS language?
Answers
Answered by
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);
}
}
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