I have the following code where I'm asking the user to input a string 'towers' followed by integers. When I try to scanf the data inputs give the following:

This is the code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char **argv)
{
int n, from, dest;
char code[]= "towers";
printf ("Code?");
scanf ("%c ", &code);
printf ("Code?");
scanf ("%d %d %d", &n, &from, &dest);
if (strcmp(code,"towers")==0 && n==0){
n=3;
from = 1;
dest = 2;
if (argc > 1){
n = atoi(argv[1]);
}
towers(n, from, dest);
exit(0);
}
else{
printf ("nothing\n");
printf ("%d",n);
}
}
What I'm trying to achieve is check user input if they type 'towers' just by itself or if they type 'towers' followed by a set of three other integers. thanks a lot for the help!
-Wall. Let the compiler show you the error of your ways.scanf ("%c ", &code);-->scanf ("%6s", code);