Need help understanding this code

This is a discussion on Need help understanding this code within the C Programming forums, part of the General Programming Boards category; Its a code to convert any given year into its Roman equivalent.
Code:
#include<stdio.h>
int roman(int year)
{
int i;
...

Sorry,I took this code from the internet and its too big so I don't wanna waste time putting it into the right format.
I am getting the output but couldn't understand the code.
If I enter a year 1988,'m' would be printed one time,then the control will enter switch case,i=((year/100)%10) which means i will be 988 then how come 'dcccc' will be printed?Because 'dcccc' will only be printed when i will be 9 but i is 988 then how will 'dcccc' be printed?

i=(('); should be i = year / 100.
A C integer division produces an integer result. As does a C modulus. All the code is doing is exhaustively enumerating the cases for thousands, hundreds, tens and units, and building up the Roman string.

i=(('); should be i = year / 100.
A C integer division produces an integer result. As does a C modulus. All the code is doing is exhaustively enumerating the cases for thousands, hundreds, tens and units, and building up the Roman string.

oops,It was typo,actually its,
i=((year/100)%10);
So in that case i will be 988 but still it seems to print 'dcccc',how when i isn't 9?

If you don't want to put the time in to format this basic code so it's more readable to others (which would take all of three minutes), what makes you think we would want to "waste time" reading through it to answer your question?