summaryrefslogtreecommitdiff
path: root/3808/CH2/EX2.14/Ex2_14.sce
blob: 33d9121f4fc82449ba16db3930bd179d84d4fb2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//Chapter 02:Basic Structures: Sets, Functions, Sequences, Sums and Matrices

clc;
clear;

s=0
res=[]
mprintf("Sum of values of s for all the members of the set { ")
for s=0:2:4
    mprintf("%d ",s)
    res=res+s
end
mprintf("} is %d",res)