Você está na página 1de 2

Sheet1

OPERATOR

arithmatic logical relationl


add a+b A=5,b=2,c=1 lessthen a<b
sub A-b (a>b)5>2 lesstyhan equal a<=b
mul a*b (a>c)5>1 greter than a>b
div a/b (a>b)&&(a>c) greater than or equal a>=b
modulo a%b 1.and(&&) true&&true=true equal to a= =b
(a>b)||(a>c) not equal a!=b
2.or(||) true||false
3.not(!) !true=false

assignment inrement and dicrament


+=(a+=1) a=a+1
-=(a-=1) a=a-1 inrement a++
/=(a/=1) a=a/1 prefix A+5,B=++A
%=(a%=1) a=a%1 A=6, B=6
postfix A=5, b=++a
A=6, b=5

dicrament a--
prefix A=5,b=a-a
A=4,b=4
postfix A=5,b=a-a
A=4,b=5

arithemetic operator pog.1

#include <stdio.h>
# include <conio.h>
Void main( )
{
Int (a,b)
Printf (“entar toe numaber for arithemectic oprator”)
Scanf (“%d,%d”,&a,&b);
Printf (“addition of %d and %d is %d”,a,b, a+b”);
Printf (“subhaction %d and %d is%d”,a,b,a-b”);
Printf (“mudtiphicution %d and %dis %d,a,b,a+b”);
Printf (“division %d and %d is%da,b,a/b”0;
Getch( );
}

arithemetic operator pog.2

#include <stdin.h>
#include <conio.h>
Void main( ) Page 1
{
Float fahrnit celiu;
Printf (“entar temperatare in
Sheet1

relationl

esstyhan equal a<=b


reter than a>b
reater than or equal a>=b
qual to a= =b
ot equal a!=b

Page 2

Você também pode gostar