[FEATURE] Add character input to simc
Chasmiccoder opened this issue · 5 comments
So far, simc deals with strings properly, but it still does not have support for C characters.
Implementation of characters:
simc code -
var c = input( "Enter a character: ", "c" )
print( c )
Corresponding C code -
char c;
printf( "Enter a character: " );
scanf( " %c", &c );
printf( "%c", c );
Note how there is a space in the scanf( ) statement in the C code. This is because if the previous line has a
newline character ( '\n' ), then scanf( ) will consume it immediately. This is why the space needs to be there.
I'll like to work on this.
@InfiniteVerma Alright, thanks by the interest!
@Math-O5 @frankhart2018 Can I make a pull request for this issue? I have solved this issue and checked by running an example mentioned in this issue. So Could you assign this issue to me, please?
Sure assigning this to you too @yashshah14093.
Merged.