+ 2
C# coders help me out here
I'm trying to make it check your age and then tell you if it's medically okay for you to drink but I don't know what all the errors are can you help me out https://code.sololearn.com/c581F4wmOQzH/?ref=app
3 Answers
+ 5
It's 'else if' not 'if else'
Swap them around and see how your code works then.
if (...)
...
else if (...)
...
else
...
+ 5
The structure of the conditional blocks needs correction. And additional condition checks is `else if` not `if else`.
if( ... )
{
// code here
}
else if( ... )
{
// more code here
}
else if( ... )
{
// more code here
}
+ 2
Oh yeah my bad thanks ChaoticDawg and Ipang