Basic arithmetic operation in C programming

C
// Visit: Pickupmyskills.com

#include <stdio.h>

int main() {
    int a = 10, b = 3;

    printf("Addition: %d + %d = %d\n", a, b, a + b);
    printf("Subtraction: %d - %d = %d\n", a, b, a - b);
    printf("Multiplication: %d * %d = %d\n", a, b, a * b);
    printf("Division: %d / %d = %d\n", a, b, a / b);
    printf("Modulus: %d %% %d = %d\n", a, b, a % b);

    return 0;
}

Output:

Addition: 10 + 3 = 13
Subtraction: 10 – 3 = 7
Multiplication: 10 * 3 = 30
Division: 10 / 3 = 3
Modulus: 10 % 3 = 1

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top