WAP on java monthly telephone charges using the following information: Fixed monthly rent : Rs 380. Free calls during the month 120 calls. Charges per call beyond free limit upto 200 calls: Rs. 1.00. Charges per call in excess of 200+120 calls: Rs 1.25
Answers
Answered by
2
class question
{
public static void main(int calls)
{
double bill = 380.0;
if(calls>120 && calls< = 320)
bill = bill+(calls-120)*1;
else if(calls>320)
bill = bill+320+(calls-320)*1.25;
System.out.println ("BILL AMOUNT : "+bill);
}
}
I am not sure but do tell me if its correct
Similar questions