[quote=kmt63,Oct 10 2005, 01:16 PM][quote=Oddball,Oct 10 2005, 12:49 PM]Cheers Mr B. I'll have a look when I get home, am at school at the moment.
While we're here:
#include <stdio.h>
int main()
{
int n("How old are you?");
scanf("%d", &n);
if (n<= 10)
 printf("You are less than ten!"\n");
if (n>= 11 | n<= 19)Â printf("You are between eleven and twenty");
elseif {
 printf("You are now considered old. Go and get your pension!!");
}
 getchar();
 return 0;
}
I have this. I'm a bit concerned about a few lines, mainly the one in red. Hope you can help!!! (Mrb, is this use of getchar() right?)
Few things wrong here:
(n<=10) will return those less than or equal to 10 and not just less than.
(n>=11 | n<=19) | is a bitwise OR not a logical function use || in fact you probably want to use a logical AND so use && or AND.
You have a dangling elseif ... change it to else
Anyone over 19 isn't that old