C Program For Converting Roman To Decimal
Sun tzu umetnost vojne pdf. Would they see it her way?
Mainshould be written int main( void )This is not just a stylistic nit - as of C99, implicit typing is no longer allowed. Scanf('%s', &ch);is not what you want here - the s conversion specifier expects ch to point to the first element of an array of char, not a single char object. It tells scanf to read a sequence of non-whitespace characters and store them to a buffer, and it will write the zero terminator to the end of that buffer (i.e., to store a one-character string, you need a 2-element array of char). As written, scanf will write to both ch and the byte immediately following it in memory, which may or may not have an effect elsewhere.To read a single character from standard input, either use scanf( '%c', &ch ); // note leading blank in format string; this tells scanf// to skip over any leading whitespace charactersor int ch.ch = getchar; // getchar returns int, not charYou might want to walk through your conversion algorithm on paper a few times.
C Program For Converting Roman To Decimal Word
C Program For Converting Roman To Decimal Form
What happens when you enter i followed by v?