#include<iostream>
using namespace std;
#include<conio.h>
void main()
{
char m[100];
int units[100],i,j,n;
float x,tb;
cout<<"enter the total number of bills to be calculate:\n";
cin>>n;
for(i=1;i<=n;i++)
{
cout<<"\nenter the name \n:==>";
cin>>m;
for(i=0;i<n;i++)
{
cout<<"\nenter the total units consumed \n:==>";
cin>>units[i];
}
}
if(units[i]<=100)
{
x=units[i]*0.6;
tb=50+x;
if(tb>300)
{
tb=0.15*tb+tb;
}
cout<<"\ncalculated bill:==>";
cout<<m<<tb;
}
else if(units[i]>100 && units[i]<=300)
{
tb=100*0.6+(units[i]-100)*0.8+50;
if(tb>300)
{
tb=0.15*tb+tb;
}
cout<<"\ncalculated bill:==>";
cout<<m<<tb;
}
else if(units[i]>300)
{
tb=100*0.6+200*0.8+(units[i]-300)*0.9+50;
if(tb>300)
{
tb=0.15*tb+tb;
}
cout<<"\ncalculated bill:==>";
cout<<m<<tb;
}
getch();
}
create spiral in c programming?
In C programming, C compiler is user to translate C source into C object module.
C++ is the name of a programming language.
It is not necessary (nor possible) in C programming.
C language is developed by Dennis Ritchie at Bell Laboratories in 1972. To know more about C Programming and learn C Programming from basics to advance visit codeforhunger. com
c is programming laungage
C and C++ are both high-level programming languages.
create spiral in c programming?
Not possible, summing an infinite series would take infinite time.
Robert Lafore has written: 'Object-oriented programming in Microsoft C++' -- subject(s): Object-oriented programming (Computer science), C++ (Computer program language), C. 'Microsoft C. Programming for the I.B.M.Personal Computer' 'Object-oriented programming in C++' 'Windows Programming Made Ridiculously Easy Book' 'The Waite Group's C Programming Using Turbo C++ (The Waite Group)' 'Microsoft C programming for the IBM' 'The Waite Group's Microsoft C programming for the PC' -- subject(s): C (Computer program language), IBM microcomputers, Microsoft C (Computer program), Microsoft C., Programming
C - programming language - was created in 1972.
In C programming, C compiler is user to translate C source into C object module.
C language is better for hardware programming .Most of the programming for hardware are written in C language so it is beneficial for hardware programming is not efficient for application programming due to drawback like in C data moves around the system.
C++ is the name of a programming language.
You can find C programming tutorials online at the C programming website. They provide both free and paid tutorials for many aspects of the C and C++ code.
The C shell was originally written by Bill Joy (of vi fame).
Download 1000s of C C C++ Programming Language. http://www.guruengineers.com