Computer Science, asked by AK26199, 11 months ago

accept a number if number is even diaplay its square if it is odd muptiply by 10 Q basic​

Answers

Answered by ajayvermajnv04
0

Answer:it is

Explanation:

Q.1 Write a qbasic program to print hello world ?

CLS

PRINT "Hello World!!!";

END

Q.2 Write a qbasic program to write your Introduction ?

CLS

INPUT "what is your name"; name$

INPUT "what is your father name ?"; fathername$

INPUT "where do u live ?"; city$

INPUT "In which class do u study ?"; class$

INPUT "What is your school/college name"; college$

INPUT "what r your hobbies ?"; hobby$

CLS

PRINT "My name is "; name$

PRINT "My father name is "; fathername$

PRINT "I live at "; city$

PRINT "Im the student of "; college$; class$

PRINT "My hobbies are: "; hobby$

END

Q.3 Write a qbasic program to input two number and find their sum ?

CLS

INPUT "Enter two number"; a, b

c = a + b

PRINT " Sum = "; c

END

Q.4 Write a qbasic program to input five numbers & find out the average of numbers ?

CLS

INPUT "Enter five numbers "; n, n1, n2, n3, n4

avg = (n + n1 + n2 + n3 + n4) / 5

PRINT " Average = "; avg

END

Q.5 Write a qbasic program to input principal, rate, and time and find out the simple interest ?

CLS

INPUT "Enter the principal"; p

INPUT " Enter the rate; r

INPUT "Enter the time; t

Si = (p*r*t) / 100

PRINT " The Simple Interest = "; si

END

Q.6 Write a qbasic program to input radius and find the area of circle and also find the circumference of circle ?

CLS

INPUT "Enter the radius of circle"; r

area = (22/7) * r ^ 2

cir = 2 * (22/7) * r

PRINT " The area of circle = "; area

PRINT " The circumference of circle = "; cir

END

Q.7 Write a qbasic program to find out the area of rectangle ?

CLS

INPUT "Enter the length of rectangle"; l

INPUT " Enter the breadth of rectangle "; b

a = l * b

PRINT " The area of rectangle = "; a

END

Q.8 Write a qbasic program to find the area of the triangle ?

CLS

INPUT " Enter the base" ;b

INPUT " Enter the height" ;h

a = 1/2*b*h

PRINT" The area of triangle= " ;a

END

Q.9 Write a qbasic program to find the area of the square ?

CLS

INPUT " Enter the length of side of a square" ; n

a = n ^ 2

PRINT" The area of square= "; a

END

Q.10 Write a qbasic program to find the lateral surface area and total surface area of a cube ?

CLS

INPUT "Enter the 'a' of cube"; n

lsa = 4 * (n ^ 2)

tsa = 6 * ( n ^ 2)

PRINT " Lateral surface area of cube = "; lsa

PRINT " Total surface area of cube = "; tsa

END

Q.11 Write a qbasic program to find the volume of cuboid ?

CLS

INPUT "Enter the length of cuboid"; l

INPUT " Enter the base of cuboid"; b

INPUT "Enter the height of cuboid"; h

vol = l * b * h

PRINT " The volume of cuboid = "; vol

END

Q.12 Write a qbasic program to input weight in Kg and convert it into gram, Pound, Ton ?

CLS

INPUT "Enter the weight in kg"; kg

g = kg * 1000

t = kg / 1000

p = kg * 2.205

PRINT kg; " kilograms = "; g; " Grams";

PRINT kg; " kilograms = "; p; " Pounds";

PRINT kg; " kilograms = "; t; " Tons";

END

Q.13 Write a qbasic program ro enter distance in kilometers and convert it into meter and miles ?

CLS

INPUT "Enter Distance into Kilometers"; km

m = km * 1000

miles = km / 1.6

PRINT km " Kilometers = "; m; " meters ";

PRINT km " kilometers = "; miles; " miles";

END

Q.14 Write a qbasic program to input two number if first number is greater than second number find out the sum of the number otherwise multiplication of number ?

CLS

INPUT "Enter two number"; a,b

IF a>b THEN

s = a + b

PRINT "sum = "; s

ELSE

m = a * b

PRINT "multiply = "; m

END IF

END

Q.15 Write a qbasic program to input radius. If radius is greater than five then find out the area of circle else circumference of circle ?

CLS

INPUT "Enter radius"; r

IF r > 5 THEN

a = 3.14 * r ^ 2

PRINT "Area of circle = "; a

ELSE

c = 2 * 3.14 * r

PRINT "Circumference of circle = "; c

END IF

END

Q.16 Write a qbasic program to input five numbers after that input any choice. If choice is greater than 5 & less than 10 then print addition, multiplication & average of five numbers ?

CLS

INPUT "Enter five numbers"; n1, n2, n3, n4, n5

INPUT " Enter your choice"; ch

IF ch > 5 AND ch < 10 THEN

s = n1 + n2 + n3 + n4 + n5

m = n1 * n2 * n3 * n4 * n5

avg = s / 5

PRINT "sum = "; s

PRINT " multiplication = "; m

PRINT " Average = "; avg

END IF

END

Q.17 Write a qbasic program to input five numbers and print the sum of those number which are between 10 to 20 ?

CLS

INPUT "Enter five numbers"; a, b, c, d, e

IF a > 10 AND a < 20 THEN

s = a + s

END IF

IF b > 10 AND b < 20 THEN

s = s + b

END IF

IF c > 10 AND c < 20 THEN

s = s + c

END IF

IF d > 10 AND d < 20 THEN

s = s + d

END IF

IF e > 10 AND e < 20 THEN

s = s + e

END IF

PRINT "sum = "; s

END

Q.18 Write a qbasic program to input five number. If first number is equal to last number, then find out the average of numbers ?

CLS

INPUT "Enter five numbers"; n1, n2, n3, n4, n5

IF n1 = n5 THEN

PRINT " Average = "; (n1+n2+n3+n4+n5) / 5

END IF

END

mark me as brainlest

Similar questions