Program for Junior class students in QBASIC


Program- 1
Cls
Print  "Program for addition of two numbers";
Print  "Enter first number:"
INPUT  a
Print  "Enter second number:"
INPUT  b
c = a + b
Print  "The addition of given numbers is :", c
Program -2
Cls
Print  "Program for bigger in two numbers";
Print  "Enter first number:"
INPUT  a
Print  "Enter second number:"
INPUT  b
If (a > b) Then
Print  "First number is greater"
Else
Print  "Second number is greater"
Program -3
Cls
Print  "Program for printing your name 5 times using for loop";
For i = 0 To 4
Print  "Ankit"
Next  i
Program -4
Cls
Print  "Program for printing first ten natural numbers using while loop: ";
i = 1
While (i <=10)
Print  i
I=i+1
Wend

Comments

  1. Wap to input username and age ,find whether he is adult or child

    ReplyDelete
  2. real good programs for juniors thank you

    ReplyDelete

Post a Comment

Popular posts from this blog

Program for calculating Simple Interest using the concept of Default Arguments

Program: Maximum number in three numbers in visual basic

Program for Checking whether the given number is Palindrome or not