Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

C Arithmetic Operators

// Working of arithmetic operators
#include <stdio.h>
int main()
{
    int a = 9,b = 4, c;
    
    c = a+b;
    printf("a+b = %d 
",c);
    c = a-b;
    printf("a-b = %d 
",c);
    c = a*b;
    printf("a*b = %d 
",c);
    c = a/b;
    printf("a/b = %d 
",c);
    c = a%b;
    printf("Remainder when a divided by b = %d 
",c);
    
    return 0;
}
 
PREVIOUS NEXT
Tagged: #C #Arithmetic #Operators
ADD COMMENT
Topic
Name
8+4 =