Friday, October 4, 2019

Qbasic program to display product of digits.


Write a program to display product of digits.


CLS
INPUT "Enter any number"; N
P = 1
WHILE N <> 0
R = N  MOD 10
P = P * R
N = N \ 10
WEND
PRINT "Product of digits="; P
END

Qbasic program to find the sum of digits.


Write a program to find the sum of digits.


CLS
INPUT "Enter any number"; N
S = 0
WHILE N <> 0
R = N MOD 10
S = S+ R
N = N \ 10
WEND
PRINT "Sum of digits"; S
END

Qbasic program to display positive, negative or zero.


Write a program to display positive, negative or zero.


CLS
INPUT "Enter any number"; N
IF N>0 THEN
PRINT "The number is positive"
ELSEIF N<0 THEN
PRINT "The number is negative"
ELSE
PRINT "The number is zero"
END IF
END

Qbasic program to find the volume of cylinder.


Write a program to find the volume of cylinder.


CLS
INPUT "Enter radius "; r
INPUT "Enter height"; h
V = 22 / 7 * r ^ 2 * h
PRINT "Volume of cylinder= "; V
END

Qbasic program to find the volume of cube.


Write a program to find the volume of cube.

CLS
INPUT "Enter length"; l
V = l ^ 3
PRINT "Volume of cube="; V
END

QBASIC PROGRAM TO FIND VOLUME OF BOX


Write a program to find the volume of box.


CLS
INPUT "Enter length"; l
INPUT "Enter height";h
INPUT "Enter breadth"; b
V = l * b * h
PRINT "Volume of box="; V
END

QBASIC PROGRAM TO FIND ARERA OF SQUARE


Write a program to find the area of square.


CLS
INPUT "Enter length "; l
A = l ^ 2
PRINT "Area of square="; A
END

QBASIC PROGRAM TO FIND AREA OF 4WALLS

Write a program to find the area of 4 walls.


CLS
INPUT "Enter height"; h
INPUT "Enter breadth";b
INPUT "Enter length"; l
A = 2 * h * ( l + b)
PRINT "Area of 4 walls= "; A
END

QBASIC PROGRAM TO FIND AREA OF TRIANGLE


Write a program to find the area of triangle.


CLS
INPUT "Enter base"; b
INPUT "Enter height "; h
A = 1 / 2 * b * h
PRINT "Area of triangle ="; A
END

QBASIC PROGRAM TO FIND AREA OF CIRCLE


Write a program to find the area of circle.


CLS
INPUT "Enter radius"; r
A= 22/7 * r ^ 2
PRINT "Area of circle= "; A
END

QBASIC PROGRAM TO FIND AREA OF RECTANGLE


Write a program to find the area of rectangle.


CLS
INPUT "Enter length";l
INPUT "Enter breadth";b
A =  l * b
PRINT "Area of rectangle=";A
END

E-Commerce

E-Commerce (Electronic Commerce) E-Commerce or Electronic Commerce means buying and selling of goods, products, or services over the interne...