in many problems it is said that there will be a blank line ... how is blank line taken as input ... how can the enter key can be taken as input
similarly the other problem is that in some problems it is not mentioned that how the input will end what to do in that case
ending the input
Moderator: Board moderators
you may just read off the blank line by using scanf("\n") or scanf("%c",dummy);
when there is no information as to how input will end termination by EOF is implied you may use either use scanf("...",<arguments)!=EOF){ <process> }
or while(!feof(stdin)){ <process>} to handle this.
when there is no information as to how input will end termination by EOF is implied you may use either use scanf("...",<arguments)!=EOF){ <process> }
or while(!feof(stdin)){ <process>} to handle this.
if u can think of it .. u can do it in software.