Conversion table
Dear all,
I tried to get the program below running but I could not. I think slash is creating problem. Any help appreciated.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#include <iostream>
using namespace std;
int main(){
float kcal/mol;
float Joule;
cout << "Bitte Grad in kcal/mol eingeben: ";
cin >> kcal/mol;
kcal/mol = 6.94769E-21*Joule;
cout << kcal/mol << "kcal/mol equals to ";
cout << Joule << "Joule" << endl;
}
| |
Line 6, that '/' is not a legal character for creating variables.
You can change it to float kcalPerMol;
Last edited on
Topic archived. No new replies allowed.