I am doing a practice in which a milk salesman should know the profit he had from selling his liters of milk, but he is paid per gallon.
The program is being developed by DEV C ++
#include <iostream>
using namespace std;
int main ()
{
float Litros, gal, ganancia, precio;
cout << "Ingresa cantidad de litros de leche vendidos:" << endl;
cin >> Litros;
cout ,, "Precios por galon:" <<endl;
cin >> precio;
gal+ (Litros/3.785);
ganancia= (precios*gal);
cout << "Ganancia por venta del dia es de= " <<ganancia<<endl;
return 0;
}
I get an error in the cout of line 8, exactly between the 2 commas. Also in the <
C:\Users\*****\programa_lechero.cpp:10:33: error: invalid operands of types 'const char [19]' and '<unresolved overloaded function type>' to binary 'operator<<'
cout ,, "Precios por galon:" <<endl;
^
C:\Users\******\programa_lechero.cpp:13:13: error: 'precios' was not declared in this scope
ganancia= (precios*gal);