Logo

(क) FUNCTION procedure प्रयोग गरी सतहको क्षेत्रफल र SUB procedure प्रयोग गरी सिलिन्डरको आयतन गणना गरी प्रिन्ट गर्ने प्रोग्राम लेख्नुहोस् । [SA =…

SEE Class 10 Computer Science · 2082 · Solved Question with Answer

(क) FUNCTION procedure प्रयोग गरी सतहको क्षेत्रफल र SUB procedure प्रयोग गरी सिलिन्डरको आयतन गणना गरी प्रिन्ट गर्ने प्रोग्राम लेख्नुहोस् । 
[SA = 2πr(h + r), V= πr²h]
Write a program to calculate and print the surface area of cylinder using FUNCTION procedure and the volume of cylinder using SUB procedure.

(ख) "Record.txt" नामको sequential data file बाट विद्यार्थीहरूको विवरण पढ्ने प्रोग्राम लेख्नुहोस् । जसबाट Gender 'M' भएको र Maths विषयका प्राप्ताङ्क 27 भन्दा कम भएका विद्यार्थीहरूको मात्र विवरण देखाउनुहोस् । फाइलमा Name, Gender, English, Nepali र Maths भन्ने फिल्डहरू छन् । (४)
Write a program to read student information from a sequential data file named "record.txt" and display only those records where the gender is 'M' and the Maths marks are less than 27. The file contents the fields: Name, Gender, English, Nepali and Maths.

Solution

Please login to view the answer.