-->
Showing posts with label Nepal telecom to get total bill for user. Show all posts
Showing posts with label Nepal telecom to get total bill for user. Show all posts

Write a 'C' program to get total amount for used Nepal telecom calls

//Nepal telecom calculates the bill according to following rule.
//minimum charge is Rs. 100 for 100 calls.
//if calls exceed 100 then charge is Rs. 1/call is added with 10% tax and 13% vat cumulatively on total amount. Write a 'C' program for this.

#include<stdio.h>
#include<conio.h>
void main()
{
float total_call,extra_call;
float initial_call=0;
float total_amount;

printf("enter total calls used\n");
scanf("%f",&total_call);
if(total_call<=100)
    {
          printf("total amount to be paid=Rs. 100\n");
    }
elseif(total_call>100)
    {
         extra_call=total_call-100;
          while(initial_call<=extra_call)
          {
           initial_call++:
         total_amount=1+initial_call*0.1+initial_call*0.13;
          }
 
         printf("the total amount=%f\n",total_amount);
      }  
}
printf("thank you!!!!\n");
getch();
}