thelearners
Programmer
Hi,
I'm trying to learn C and coding it on AS400. Here is my
program.
#include <stdio.h>
int main(void)
{
int month;
printf("enter month: ");
scanf("%d", &month);
return 0;
}
I compiled it with command CRTBNDC. When I called it, I got a blank screen with a command line. When I entered some number ie 3 then the screen printed out as below.
> 3
enter month:
Press ENTER to end terminal session.
It doesn't seem right to me. I thought right after I call the program, it suppose to prompt on the screen say "enter month". Can someone please explain to me? Is my result correct?
Thanks in advance.
I'm trying to learn C and coding it on AS400. Here is my
program.
#include <stdio.h>
int main(void)
{
int month;
printf("enter month: ");
scanf("%d", &month);
return 0;
}
I compiled it with command CRTBNDC. When I called it, I got a blank screen with a command line. When I entered some number ie 3 then the screen printed out as below.
> 3
enter month:
Press ENTER to end terminal session.
It doesn't seem right to me. I thought right after I call the program, it suppose to prompt on the screen say "enter month". Can someone please explain to me? Is my result correct?
Thanks in advance.