-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstudentsmarksarray.fprg
40 lines (40 loc) · 2.51 KB
/
studentsmarksarray.fprg
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
<?xml version="1.0"?>
<flowgorithm fileversion="3.0">
<attributes>
<attribute name="name" value=""/>
<attribute name="authors" value="Ananth"/>
<attribute name="about" value=""/>
<attribute name="saved" value="2022-12-09 10:44:20 AM"/>
<attribute name="created" value="QW5hbnRoO0RFU0tUT1AtOEQ2U1ZFRzsyMDIyLTEyLTA5OzA5OjQ3OjAxIEFNOzI5NDA="/>
<attribute name="edited" value="QW5hbnRoO0RFU0tUT1AtOEQ2U1ZFRzsyMDIyLTEyLTA5OzEwOjMzOjQwIEFNOzM7ZGVlcGFrO0RFRVBBS0tVTUFSOzIwMjItMTItMDk7MDk6Mjc6MTMgQU07U3R1ZGVudHNNYXJrUmVjb3JkXzkxMTIwMjJbMV0uZnByZzs4ODcz"/>
<attribute name="edited" value="QW5hbnRoO0RFU0tUT1AtOEQ2U1ZFRzsyMDIyLTEyLTA5OzEwOjQ0OjIwIEFNOzI7MzAzOQ=="/>
</attributes>
<function name="Main" type="None" variable="">
<parameters/>
<body>
<declare name="students" type="Integer" array="False" size=""/>
<output expression="" Enter the total number of students"" newline="True"/>
<input variable="students"/>
<declare name="marks, total, average" type="Integer" array="True" size="5"/>
<declare name="i, x, iroll, imarks, itotal, iaverage" type="Integer" array="False" size=""/>
<for variable="i" start="0" end="students" direction="inc" step="1">
<output expression=""Enter the roll number of student"&i+1&""" newline="True"/>
<input variable="iroll"/>
<for variable="x" start="0" end="4" direction="inc" step="1">
<output expression=""Enter the marks for subject"&x+1&""" newline="True"/>
<input variable="marks[x]"/>
</for>
<assign variable="itotal" expression="0"/>
<for variable="x" start="0" end="4" direction="inc" step="1">
<assign variable="itotal" expression="itotal+marks[x]"/>
</for>
<output expression=""Roll no:"&iroll" newline="True"/>
<for variable="x" start="0" end="4" direction="inc" step="1">
<output expression=""Your mark in Subject "&x+1&" is" &marks[x]" newline="True"/>
</for>
<output expression=""Your total marks is:"&itotal" newline="True"/>
<output expression=""The average is :"&itotal/5" newline="True"/>
</for>
</body>
</function>
</flowgorithm>