cannot debug this programming

hi..i new at here..i had a problem with c++ proggraming and i don't how to fixed it..when i debug it, it cannot run and not responding..i dont know why.. i hope somebody will help me..can u guys see what was mistaken i had make

#include<iostream.h>
void main ()
{
float data='y', menucode, quantity, price, total_price_per_order,
count_customer, gov_tax, ser_tax, charged;
int total_priceK=0.0;
int total_priceR=0.0;
int total_priceM=0.0;
int count=0;
int customer=0;
int actual_price=0;
int total_price=0;
int total=0;
while (data == 'y')
{
cout << " enter the menucode ";
cin >> menucode;
cout << " enter quantity ";
cin >> quantity;

if (menucode == 'k')
price = 7.50;
else if (menucode == 'r')
price = 16.40;
else
price = 28.90;
//endif
//endif

total_price_per_order = price*quantity;
count_customer = count++ ;
gov_tax = 0.05;
ser_tax = 0.10;
charged = ser_tax + gov_tax;
actual_price = charged + total_price_per_order;
total_price = actual_price*count_customer;
}
cout << " total price " << total << endl;
cout << " any customer?? (Y/N)" << customer << endl;
cout << " invalid menucode" ;
}


i have 4 warning

Warning ASGMT3(1.CPP 41: 'total_price' is assigned a value that is never used in function main()
Warning ASGMT3(1.CPP 41: 'total_priceM' is assigned a value that is never used in function main()
Warning ASGMT3(1.CPP 41: 'total_priceR' is assigned a value that is never used in function main()
Warning ASGMT3(1.CPP 41: 'total_priceK' is assigned a value that is never used in function main()








Last edited on
The warning you can ignore but the description is quite clear.


total_price = actual_price*count_cuctomer;


You have not declare the variable count_cuctomer and you use immediately so it is an error.
Topic archived. No new replies allowed.