on blue java plzz bhai
Answers
Answer:
please correct the gifts to be given as i was unable to read them, the rest program is as per your request and will run on blue J
Explanation:
import java.io.*;
public class abc
{
public static void main(String args[])throws IOException
{
InputStreamReader read = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(read);
int sale;
float com;
System.out.println("enter the amt of sale");
amt = integer.parseInt(in.readLine());
if(amt<40000)
{ System.out.println(" gift is set of two pens");
com = (12.5*amt)/100;
System.out.println("and commision is :"+com);
}
else if(amt>40000 && amt<59999)
{ System.out.println(" gift is a calculator");
com = (15*amt)/100;
System.out.println("and commision is :"+com);
}
else if(amt>60000 && amt<79999)
{ System.out.println(" gift is table clock");
com = (20*amt)/100;
System.out.println("and commision is :"+com);
}
else if(amt>80000 && amt<99999)
{ System.out.println(" gift is wall clock");
com = (22.5*amt)/100;
System.out.println("and commision is :"+com);
}
else if(amt>=100000)
{ System.out.println(" gift is ");
com = (25*amt)/100;
System.out.println("and commision is :"+com);
}
}
}