I think thats a problem of sololearn. You can only enter input once i think.
Maybe you should try it on a computer. You can compile a .c file with the gcc compilers for example in the linux terminal. If your file is named test.c you can say "gcc -o test test.c" and call it after that with ./test
(With -o you define the name of your executable)