IHYPRESS.NET
C
HOME | ASP | C | CSS | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
Earn Free Bitcoin
CData Types & Operators ❯ Remainder Operator
<02.01>
/* The remainder (%) operator */
#include <stdio.h> int main (void) { int a, b, c, d; /* a few operations */ a = 10 % 3; b = -10 % 3; c = 10 % -3; d = -10 % -3; /* you need to double the % to display on screen */ printf ("10 %% 3 is %d\n", a); printf ("-10 %% 3 is %d\n", b); printf ("10 %% -3 is %d\n", c); printf ("-10 %% -3 is %d\n", d); return (0); }
Hergestellt in Deutschland / Made in Germany
10 % 3 is 1 -10 % 3 is -1 10 % -3 is 1 -10 % -3 is -1
COPYRIGHT © 2015-2024 IHYPRESS.NET. A DIVISION OF IHY PRESS. ALL RIGHTS RESERVED.