0
what need to fix?
#include <iostream.h> #include <conio.h> voidmain (){ int nama, mata kuliah, nilai uts, nilai uas, nilai akhir; cout <<"masukan nama:"; cin >> nama; cout <<"masukan mata kuliah:"; cin >> mata kuliah; cout <<"masukan nilai uts:"; cin >> nilai uts; cout <<"masukan nilai uas:"; cin >> nilai uas; nilai akhir = nilai uts+nilai uas; cout<<"nilai akhir=" <<nilai akhir; }
1 Answer
+ 2
if you are trying to run it on sololearn playground:
remove conio.h. it is outdated, compiler-specific, and unnecessary.
all inputs must be provided at the beginning of the program, in the pop-up window, separated by line breaks. sololearn c++ playground is not interactive.
also, variable names cannot contain spaces.