Important C Programs

Program to calculate the telephone bill based on the following conditions :

1. 0-200 calls are free
2. 200-500 calls would cost 1 Rs / call
3. Calls > 500 would cost 2 Re/call
4. 200 is rental

#include <stdio.h>
#include <conio.h>
void main()
{
    int calls, bill=0;
    printf("Enter the number of calls");
    scanf("%d",&calls);
             
if
(calls<=200)         bill=0;       if(calls>200&& calls<=500)         bill=200*0+ (calls-200)*1;       if(calls>500)         bill=200*0+300*1+(calls-500)*2;     bill=bill+200; // 200 rental is added.     printf("the final bill =%d",bill); }

Video/ C Introduction

Watch video in full size
Wordpress Social Share Plugin powered by Ultimatelysocial