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);
Asked
Active
Viewed 951 times
-3

David Heffernan
- 601,492
- 42
- 1,072
- 1,490
1 Answers
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
-
you have email dude – Rizki Nur Rahmat Dec 23 '18 at 12:42
-
https://meta.stackexchange.com/questions/320815/fatal-syntax-error-expected-but-identifier-found?noredirect=1#comment1051313_320815 can you correcting my coding on this website . idk how to post my coding on there – Rizki Nur Rahmat Dec 23 '18 at 12:45
-
1No, dude, no email. You.can work this out with reference to a good book or online course. – David Heffernan Dec 23 '18 at 13:59