-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadd_integer.m
30 lines (30 loc) · 1.13 KB
/
add_integer.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
%--------------------------------------------------------------
% Welcome to Getscriptall
%--------------------------------------------------------------
% SIMPLE ADDITION OF INTEGER PROGRAM:
%--------------------------------------------------------------
%Addition of two positive numbers:
%--------------------------------------------------------------
a=8;
b=5;
s1=a+b;
disp(s1);
%--------------------------------------------------------------
%--------------------------------------------------------------
%Addition of two negative numbers:
%--------------------------------------------------------------
a=-8;
b=-5;
s2=a+b;
disp(s2);
%--------------------------------------------------------------
%--------------------------------------------------------------
%Addition of two floating point numbers:
%--------------------------------------------------------------
a=0.8;
b=0.5;
s3=a+b;
disp(s3);
%--------------------------------------------------------------
%%%%%%%%%%%-------------------$$$$$$$$>>>>> BY Getscriptall <<<<$$$$$$$$$-----------------%%%%%%%%%%%%%%
% @@@ for any query contact: info.getscriptall@gmail.com