69) Design a form and write a program in visual basic to input employee code, employee name and address of some employees from one input data file named as employee.txt and in array. Input basic pay, DA, HRA, medical from second input data file named as salary.txt in an array. Both data files contain same number of records. Calculate gross pay with formula basic pay + DA + HRA + medical. Print employee code, employee name, address and calculated gross pay in ascending order on gross pay?

Private Sub Command1_Click()     Dim STemp, EName(1 To 100), Address(1 To 100) As String     Dim i, j, x, ITemp, Code(1 To 100), Basic(1 To 100), DA(1 To 100), HRA(1 To 100), Medical(1 To 100), Gross(1 To 100) As Integer     Open "Employee.txt" For Input As #1     i = 0     Do While Not... Continue Reading →

Advertisements

68) Design a form and write a program in visual basic to input roll no and total marks of some students from an input data file marks.dat in an array. Arrange and print both roll no and total marks in descending order on total marks on screen?

Private Sub Command1_Click()     Dim x, i, j, temp, rn(1 To 100), tm(1 To 100) As Integer     Open "Marks.dat" For Input As #1     i = 0     Do While Not EOF(1)         i = i + 1         Input #1, rn(i), tm(i)     Loop     Close #1     x = i     For... Continue Reading →

67) Design a form and write a program in visual basic to input name, roll and marks of five subjects of 5 students from an input data file named as marks.txt. Calculate total marks of 5 students and print name, roll and total marks of all student on screen?

Private Sub Command1_Click()     Dim i, rn, tm, s1, s2, s3, s4, s5 As Integer     Dim name As String     Open "Marks.txt" For Input As #1     Cls     Print "Name", "Roll No", "Total Marks"     For i = 1 To 5         Input #1, name, rn, s1, s2, s3, s4, s5         tm... Continue Reading →

66) Design a form and write a program in visual basic to input roll number of total marks of 5 students from an open input data file named as marks.txt. Write both roll number and total marks on screen?

Private Sub Command1_Click()     Dim i, rn, tm As Integer     Open "Marks.txt" For Input As #1     For i = 1 To 5         Input #1, rn, tm         Print rn, tm     Next i     Close #1 End Sub

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: