-3
TOTAL [X] := 
    (0.1 tomat*harga tomat ) + (0.2 cabe*harga cabe) + (0.3 kol*harga kol)+ 
    (0.4 ikan*hargaikan)+  (0.5 tahun*hargatahu) + (0.6 tahu*harga tahu);
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490

1 Answers1

1

Each of the six sub expressions has syntax errors. For instance

0.1 tomat*harga tomat

You can't omit operators like you do in maths. So perhaps what you meant is

0.1 * tomat * harga * tomat

Or perhaps harga tomat is meant to be a single variable. Variable names cannot contain spaces. So you'd need to rename it without a space.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490