Ads 468x60px

COOL TIPS AND TRICKS

COOL TIPS AND TRICKS

7..Electric Bill

#include<stdio.h>
#include<conio.h>
void main()
{
       float total,unit,cc=3.25,sc=0.150,tc=0.150;
       char name[30],month[15];
       clrscr();
       printf("\n\nEnter name:");
       gets(name);
       printf("\n\nEnter  Month:");
       gets(month);

       printf("\n\nEnter Number of Units :");
       scanf("%f",&unit);
       cc=cc*unit;
       printf("\n\nConsumption Charges :%f",cc);
       sc=sc*unit;
       printf("\n \nService Charges :%f",sc);
       tc=tc*unit;
       printf("\n\nTaxation Charges :%f",tc);
       total=cc+tc+sc;
       printf("\n \nName of consumer :%s",name);
       printf("\n\nName of Month :%s",month);
       printf("\n\nTOTAL:%f",total);
       getch();

}

No comments:

Post a Comment