This might be an eazy problem to fix,
assume all works except the int to double
[code=cpp]
double total = 0;
double Qty[10];
int price[10];
for(int i = 0; i < 9; i++)
{
total += Qty[i] * (double)price[i];
}
[/code]
i need to get total in the forme of a double.
any ideas?
assume all works except the int to double
[code=cpp]
double total = 0;
double Qty[10];
int price[10];
for(int i = 0; i < 9; i++)
{
total += Qty[i] * (double)price[i];
}
[/code]
i need to get total in the forme of a double.
any ideas?
Comment