Friday, October 30, 2015

Simple 7 Easy QBASIC Programs


#Write a program to find the area of the circle.


Cls
Input" Enter the radius " ;R
Let A=22/7*R^2
Print " The area of circle =" ;A
End




#Write a program to find the circumference of the circle.


Cls
Input" Enter the radius " ;R
Let Circumference=22/7*R*2
Print " The area of circle =" ;Circumference
End 




#Write a program to find the area of the square.


Cls
Input" Enter the number" ;n
Let square= n^2
Print" The area of square=" ;Square
End




#Write a program to find the area of the square and cube. 


Cls
Input" Enter the number" ;n
Let square= n^2
Let Cube = n^3 
Print" The area of square=" ;Square
Print" The area of cube=" ; Cube
End




#Write a program to find the volume of the box.


Cls
Input " enter the length " ;l
Input " enter the breadth " ;b 
Input " enter the height " ;h
Let Volume= l*b*h
Print" The volume of box =" ;Volume
End 




#Write a program to convert the weight from kilogram to pounds.


CLS
Input"Enter the weight in kilogram";K
Let P=K*2.2
Print "The pound is ";P
End




#Write a program to convert the distance from kilometer to miles.


Cls
Input"Enter the length in kilometer";K
Let M= K / 1.6

Print "The length in miles =";M
End



3 comments:

  1. Write a program to find the volume of the box. blogspot

    ReplyDelete
  2. A program to find the volume of a box.
    CLS
    INPUT "Enter the length of the box"; l
    INPUT "Enter the breadth of the box"; b
    INPUT "Enter the height of the box"; h
    v = l * b * h
    PRINT "The volume of the box is"; v
    END

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete

Simple 7 Easy QBASIC Programs

#Write a program to find the area of the circle. Cls Input" Enter the radius " ;R Let A=22/7*R^2 Print " The area of circle ...