-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestcase9.txt
56 lines (50 loc) · 1.08 KB
/
testcase9.txt
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
51
52
53
%Test Case 1
%Following function computes the sum of user defined real numbers
%The variable d3 maintains the sum of values
_sumN input parameter list [int d5cc34]
output parameter list[real d3,int d2,real b5];
type int : b5b567;
type int : b5b567;
b5b567 <--- 1;
%d3 <--- 0.00;
while ( b5b567 <= d5cc34)
read( c3bd);
d3 <--- d3 + c3bd;
b5b567 <--- b5b567 + 1;
endwhile
return [d3];
end
_sumN input parameter list [int d5cc34,real b5]
output parameter list[real d3,int d2,real b5];
type int : b5b567;
type int : b5b57;
b5b567 <--- 1;
%d3 <--- 0.00;
while ( b5b567 <= d5cc34)
read( c3bd);
d3 <--- d3 + c3bd;
b5b567 <--- b5b567 + 1;
endwhile
return [d3];
end
_sumN input parameter list [int d5cc34,real b5]
output parameter list[real d3,int d2,real b5];
type int : b5b567;
type int : b5b57;
b5b567 <--- 1;
%d3 <--- 0.00;
while ( b5b567 <= d5cc34)
read( c3bd);
d3 <--- d3 + c3bd;
b5b567 <--- b5b567 + 1;
endwhile
return [d3];
end
_main
type int :b3;
type real :c4bd56;
b3 <--- 7;
[c4bd56]<--- call _sumN with parameters [b3];
write(c4bd56);
return;
end