Welcome Guest.

2Answers

C language, syntax error

Asked by: Kathleen 223 views IT November 5, 2018

C language, syntax error

2 Answers

  1. +5Votes  

    The upstairs is right, but the novice should learn how to deal with the problem:

    1. An error occurs, double-click to locate the error.

    2. Translation error prompt, understanding is a What is wrong, for example, here is probably “invalid operands to binary, % operands have integers and floating-point numbers”. See if you can test the current understanding and solve it immediately, you can’t proceed to the next step.

    3. Copy error prompt [Error] invalid operands to binary % (have ‘int’ and ‘float’)   Paste into search engine (such as so.com) search, see if there are other users to meet

    4. Look for information, book verification, and deepen the impression. If the code is % (remaining), the operands on both sides must be integers. Please see the picture.

    I wish you academic progress.

    Barbara Mitchell- November 5, 2018 |

  2. +3Votes  

    % is the remainder operation, the remainder of the division of two integers, the floating point number is not able to perform the remainder operation

    Stephen Roberts- November 6, 2018 |