So, I know some of the rest of the code is probably wrong, but my current issue is that whenever i compile it returns:
"expected primary-expression before 'else'"
"expected `;' before 'else'"
for all loops containing else if expressions. Is there something I'm missing within the expressions or is some other part of my code messing them up?
There are two conditions, each must be expressed in full. The logical and operator && is used to combine the two.
if ((60 <= Pressure) && (Pressure <= 70))
This assignment is wrong.
T = T--;
It should be simply
T--;
Its hard to interpret what the overall logic should be, there are different quantities being tested
Temperature
Pressure
DwellTime
and just what rules should be applied is not clear. Perhaps you have a plain English description of the requirements?
The while loop here
1 2
while (infile) {
}
looks like a problem. It will either not execute at all, or will result in an infinite loop which never terminates.