Noen enkle nybegynner spørsmål
if(age<20) //If the age is less than 100{
cout<<"You are pretty young!"; //Just to show it works
}
else if(age>20 AND age<50) //I use else just to show an example
{
cout<<"You are old"; //Just to show you it works...
}
else if(age>100) //I use else just to show an example
{
cout<<"You are old"; //Just to show you it works...
}
else
{
cout<<"You are really old"; //Executed if no other statement is executed
}
hvorfor virker ikke denne:" else if(age>20 AND age<50)"??