
6-43Loop Control
Explanation:
In the above program, the number of students whose result is to be calculated is entered. Aer
this, the marks of six subjects with their roll numbers are entered. e sum of six subjects is
calculated. e sum is compared with distinction, rst and second macros using if–else
ladder and appropriate result is displayed.
In this program, macros are used. During preprocessing, the preprocessors replace every occur-
rence of distinction with 420, similarly, rst and second are replaced with 360 and 240, respectively.
Distinction, rst and second in the above program are ‘macro templates’, whereas 420, 360 and 240 ...