Computer Science, asked by sonisharan975, 9 months ago

Please answer this question soon its urgent
BSNL charges for using telephone from their consumer according to the calls made. Number of Calls Change Upto 50 calls No charge (free) For next 100 calls `1 per call For next 200 calls 90 paise per call More than 350 calls 80 paise per call Monthly rental charge is `180 per month for all the consumers for using telephone. Write a program to calculate monthly telephone bill indicating number, calls, monthly rental and total amount to be paid.

Answers

Answered by Kimtae1401
2

Answer:

you should pay bill it is telling

Answered by manya841
1

Answer:

import java.util.*;

public class BSNL

{

   public static void main(String aa[])

   {

      int calls;

      double amt;

      Scanner sc=new Scanner(System.in);

      System.out.print("Enter the number of calls : ");

      calls=sc.nextInt();

      if(calls<=50)

      {

          amt=0;

      }

      else if(calls>50 && calls<=150)

      {

         amt=(calls-50)*1;

      }

       else if(calls>150 && calls<=350)

      {

         amt=100+(calls-150)*0.9;

      }

       else

      {

         amt=100+(200*0.9)+(calls-350)*0.8;

      }

      System.out.println("No. of calls : " +calls);

      System.out.println("Total Amount to be paid : "+amt);    

   }

}

Explanation:

I hope this helps :)

Similar questions