-
Notifications
You must be signed in to change notification settings - Fork 0
/
Arithmetic_operation.m
50 lines (49 loc) · 1.26 KB
/
Arithmetic_operation.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
%--------------------------------------------------------------
% Welcome to Getscriptall
%--------------------------------------------------------------
% Arithmetic operation
%-------------------------------------------------------------
% 1. Addition
%--------------------------------------------------------------
a=8;
b=7;
sum=a+b;
disp(sum);
% 2. Subtraction
%--------------------------------------------------------------
a=6;
b=7;
sub=a-b;
disp(sub);
% 3. Division
%--------------------------------------------------------------
a=8;
b=3;
div=a/b;
disp(div);
% 4. Multiplication
%--------------------------------------------------------------
a=5;
b=3;
mul=a*b;
disp(mul);
% 5. Modulus
%--------------------------------------------------------------
a=8;
b=6;
modulus=mod(a,b);
disp(modulus);
% 6. Square
%--------------------------------------------------------------
a=5;
b=2;
sq=a.^b;
disp(aq);
% 7. Square root
%--------------------------------------------------------------
a=64;
sr=sqrt(a);
disp(sr);
%----------------------------------------------------
%%%%%%%%%%%-------------------$$$$$$$$>>>>> BY Getscriptall <<<<$$$$$$$$$-----------------%%%%%%%%%%%%%%
% @@@ for any query contact: info.getscriptall@gmail.com