C arithmetic operators tutorial example explained
#C #arithmetic #operators
// arithmetic operators
// + (addition)
// - (subtraction)
// * (multiplication)
// / (division)
// % (modulus)
// ++ increment
// -- decrement
int x = 5;
int y = 2;
// int z = x + y;
// int z = x - y;
// int z = x * y;
// float z = x / (float) y;
// int z = x % y;
// x++;
// y--;
printf("%d", x);
printf("%d", y);
return 0;
#C #arithmetic #operators
// arithmetic operators
// + (addition)
// - (subtraction)
// * (multiplication)
// / (division)
// % (modulus)
// ++ increment
// -- decrement
int x = 5;
int y = 2;
// int z = x + y;
// int z = x - y;
// int z = x * y;
// float z = x / (float) y;
// int z = x % y;
// x++;
// y--;
printf("%d", x);
printf("%d", y);
return 0;
- Category
- Bro Code
- Tags
- arithmetic, arithmetic operations, arithmetic operators in c
Be the first to comment



