Operators
Arithmetic Operators
Demonstrate all arithmetic operators on two integers.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Demonstrate all arithmetic operators on two integers.
#include <stdio.h>
int main() {
int a = 10, b = 3;
printf("Add: %d\n", a + b);
printf("Sub: %d\n", a - b);
printf("Mul: %d\n", a * b);
printf("Div: %d\n", a / b);
printf("Mod: %d\n", a % b);
return 0;
}
Add: 13
Sub: 7
Mul: 30
Div: 3
Mod: 1