Header Ads Widget

Arithmetic Operators


Arithmetic operators are used for numeric calculations. % can not be applied with floating point operands.There is no exponential operator in C, but for this purpose we can use pow( ).
Example :
#include <stdio.h>
void main( )
{
int a=3 , b=6 ;
printf("Add = %d \n", a+b);
printf("Sub = %d \n", a-b);
printf("Product = %d \n", a*b);
printf("Quotient = %d \n", a/b);
printf("Remainder = %d \n", a%b);
}


Post a Comment

0 Comments