#include<stdio.h>
void main()
{
int n;
float k=n,temp,l,j;
clrscr();
printf("Enter the number of calls : ");
scanf("%d",&n);
if(n<=100)
{
printf("Amount to be paid is rate.%f",k);
}
else if(n>101&&n<=500)
{
temp=0.15;
k=k+temp;
printf("Amount To Be Paid Is %f",k);
}
else if(n>101&&n<=500)
{
j=0.2;
n=n-500;
temp=0.15*n;
k=k+temp+j;
printf("Amount to be paid is %f",k);
}
else if(n>501)
{
j=0.1;
l=0.15;
n=n-501;
temp=0.1*n;
k=k+j+l+temp;
printf("Amount To Be Paid Is %f",k);
}
getch();
}
{
int n;
float k=n,temp,l,j;
printf("Enter the number of calls : ");
scanf("%d",&n);
if(n<=100)
{
printf("Amount to be paid is rate.%f",k);
}
else if(n>101&&n<=500)
{
temp=0.15;
k=k+temp;
printf("Amount To Be Paid Is %f",k);
}
else if(n>101&&n<=500)
{
j=0.2;
n=n-500;
temp=0.15*n;
k=k+temp+j;
printf("Amount to be paid is %f",k);
}
else if(n>501)
{
j=0.1;
l=0.15;
n=n-501;
temp=0.1*n;
k=k+j+l+temp;
printf("Amount To Be Paid Is %f",k);
}