Well Come to Professional Programmers

Learning Goal

Learning is a process to acquire, enhance, or make changes in one's knowledge. Learning Module presents essential and masks non-essential pieces of knowledge. It is self paced and presents required links to important examples and related terminologies essentially required for examination centric study. The module is focused on examination system in vogue in Pakistan and helps student acquire maximum marks in limited time of study.

Monday, April 12, 2010



Practical#08



SOURCE PROGRAM



10 REM FIND THE TOTAL NUMBER OF MALE AND FEMALE STUDENTS

20 CLS

30 FOR A= 1 TO 10

40 INPUT "ENTER NAME";N$(A)

50 INPUT "ENTER SEX";S$(A)

60 NEXT A

70 PRINT "S.NO", "NAME", "SEX"

80 LET M=0 : F=0

90 FOR B = 1 TO 10

100 PRINT B, N$(B), S$(B)

110 IF LEFT$(S$(B),1) = "F" THEN F = F + 1 ELSE M = M + 1

120 NEXT B

130 PRINT "TOTAL NUMBER OF MALE STUDENTS=:";M

140 PRINT "TOTAL NUMBER OF FEMALE STUDENTS=:";F

150 END




OUTPUT



S.NO NAME SEX
1 ABRAR MALE
2 FARHAN MALE
3 FARHAT FEMALE
4 QADIR MALE
5 FARNAZ FEMALE
6 TARIQ MALE
7 ALI MALE
8 TOOBA FEMALE
9 SHOAKAT MALE
10 ARZOO FEMALE

TOTAL NUMBER OF MALE STUDENTS=: 6
TOTAL NUMBER OF FEMALE STUDENTS=: 4



Return to Top

No comments:

Post a Comment