10th class
import java.util.*;
class Q_1
{
public static void main ();
Scanner in=new Scanner(System.in);
{
System.out.println("Enter 0 for odinary booking and 1 for Express booking");
int t;
{
if(t==0)
System.out.println("Enter the weight of the parcel");
int w;
{
if(w<100);
System.out.println("Charges applied Rs.80");
}
{
if(w>101)
if(w<500);
System.out.println("Charges to be applied Rs.150");
}
{
if(w>510)
if(w<1000);
System.out.println("Charges to be applied Rs.210");
}
{
if(w>1000);
System.out.println("Chrages to be applied Rs.250");
}
}
{
if(t==1)
System.out.println("Enter the weight of the parcel");
int w;
{
if(w<100);
System.out.println("Charges applied Rs.100");
}
{
if(w>101)
if(w<500);
System.out.println("Charges to be applied Rs.200");
}
{
if(w>510)
if(w<1000);
System.out.println("Charges to be applied Rs.250");
}
{
if(w>1000);
System.out.println("Chrages to be applied Rs.300");
}
}
}
}
What did i do wrong? this is not working on bluej. plz check and tell me. if you do not know move on i dont like ppl who fool around
Answers
Answer:
Mark me as a Brainlist plz
Explanation:
10th class import java. util.*;
class Q_1
{
public static void main ();
Scanner in=new Scanner(System. in);
{
System. out. println("Enter 0 for odinary booking and 1 for Express booking");
int t;
{
if(t==0)
System. out. println("Enter the weight of the parcel");
int w;
{
if(w<100);
System. out. println("Charges applied Rs.80");
}
{
if(w>101)
if(w<500);
System. out. println("Charges to be applied Rs.150");
}
{
if(w>510)
if(w<1000);
System. out. println("Charges to be applied Rs.210");
}
{
if(w>1000);
System. out. println("Chrages to be applied Rs.250");
}
}
{
if(t==1)
System. out. println("Enter the weight of the parcel");
int w;
{
if(w<100);
System. out. println("Charges applied Rs.100");
}
{
if(w>101)
if(w<500);
System. out. println("Charges to be applied Rs.200");
}
{
if(w>510)
if(w<1000);
System. out. println("Charges to be applied Rs.250");
}
{
if(w>1000);
System. out. println("Chrages to be applied Rs.300");
}
}
}
}
is the correct program run it and check it