Past Ten Years Questions of VB
Past Ten Years Questions of VB
Past Ten Years Questions of VB
http://informationtechnology.pk https://www.facebook.com/it4all.pk
Visual Basic 6.0 Punjab University papers
Question no 2. Write a VB program that takes n numbers as input . it outputs the frequency of
positive and negative numbers . A sample input and out put as follows:-. 12.5
Input
N = 12
Output :-
Question NO 3. Write a VB program that reads n values in a list and print the product of the value
and position at which it resides in the list . product = L[1]*1 , product = L[2] * 2 and so on
Example:- position :- 1 2 3 4 5
Value 5 3 7 1 4
Output :- 5 6 21 4 20
http://informationtechnology.pk https://www.facebook.com/it4all.pk
Visual Basic 6.0 Punjab University papers
Question no . 2 write a VB program that takes N numbers as input . it print the maximum
number and its frequency (number of occurrence ) . 12.5
Sample no 1
N= 10
The 10 inputs are 7,20 , -1 , 65 , 36 , 90, 78 , 90 ,90 ,-2
Maximum is 90
Frequency is 3
Question no 3 . Write a program that read 10 numbers from user and store them in an array. Print
the numbers in ascending order . A sample program is given below . 12.5
7,8,90,34,2,9,12,1,10,32
Output :-
1,2,7,8,9,10,12,32,34,90
Question no . 3 write a VB program that should takes 10 numbers as input and store them in an
array. It should print the number of even numbers among those numbers . you need to use if –else
and loop in your program . 12.5
Question No 3. Write a program in VB that should takes 3 numbers from user as input . your
program find and print the square and cube of these three numbers on the screen . 12.5
(B) write a VB program that inputs three distinct number and find and display middle one .
Question No 2(a) The Area of a rectangle is the rectangle’s multiplied by its width . write program
that asks for length and width of two rectangles . The program should tell the user which rectangle
has the greater area or if the area are the same . (6.0+6.5)
(b) . Write a VB program that should take a positive number n as input . your should display the
sum of all numbers between 1 to n numbers .
Question NO 3.(a) write a VB program that should take 10 number from user . your program
should find and display the maximum number . (6.0+6.5)
http://informationtechnology.pk https://www.facebook.com/it4all.pk
Visual Basic 6.0 Punjab University papers
(b) write a program that should takes two numbers (that is , first and last ) from the user and display
all the numbers and their square in the form of an order pair between first and last numbers
3. visual programming
Question No 1(b) running on a particular treadmill burn 3.9 calories per minutes . write a program
that uses a loop to display the number of calories burned after 10, 15 ,20 , 25 and 30 minutes
Question NO 2(a) A country club , which currently charge RS. 2500 per year for membership has
, announced it will increase its membership fee by 4% each year for next 6 years . write a program
uses loop to display the projected for next six years. (6.0+6.5)
Question No 2(b) write a VB program that should takes 10 positive numbers as input . your
program should display the sum of all the numbers from 1 to n numbers .
Question NO 3(a) write a VB program that should takes 10 minutes from user and save in an array
. your program should sort and display these numbers in ascending order. (6.0+6.5)
Question N0 .3(b) write a program that asks the user to enter the amount that he or she budgeted
for a month . A loop should then user to enter each of his or her expenses for the month and keep
a running total . when the loop finishes , the program should displays the amount that user is
over or under the budgets .
http://informationtechnology.pk https://www.facebook.com/it4all.pk