Sei sulla pagina 1di 2

VI std QBASIC program Assignment Program 1 Write a program to find the sum and average of three numbers?

REM to find the sum and average of three numbers PRINT Enter the first number INPUT a PRINT Enter the second number INPUT b PRINT Enter the third number INPUT c Sum = a+b+c Average = sum / 3 PRINT The sum of three numbers,sum PRINT The average of three numbers,average END Program 2 Write a program to accept your friends name and print HELLO to them. REM to accept our friends name PRINT Enter your friends name INPUT a$ PRINT HELLO + a$ END

Program 3 Veena wants to find the difference between her age and her fathers age. Write a program to help her out. REM to find difference between ages PRINT Enter veenas age INPUT vage PRINT Enter veenas fathers age INPUT fage Difference = fage vage PRINT Difference between veenas age and her fathers age is , difference END Exercise: 1. Rahul wants to find the total of his 3 subjects mark namely English, Science and Social. Write a program to help him out. 2. Sudha wants to find the total of her 4 subjects mark namely English, Maths, Science and Social and she wants to find the average of these subjects. Write a program to help her out.

Potrebbero piacerti anche