if (Serial.available() > 0) {
for(int i;i<2;i++)
R*=Serial.read();[/quote]* First you check if there is AT LEAST ONE serial data available. Then you try and read THREE. How do you think this is going to work? Remember Serial is S. L. O. W. Your Arduino can run that loop thousands of times before the second character arrives. Look for Robin's Serial Input Basics post in the Programming section. Then use the auto-formatter on the tools menu to get your indentation correct. Using a for() loop without the braces ({}) is usually a bad idea for readability.