QBASIC Program to find Cube and Square.

 Input any number and display it's cube.
-----------------------------------------------------

  CLS
   INPUT "Enter the value for a"; a
   LET c=a*a*a
   PRINT "Cube="; c
   END

   >>Output>> "Enter the value for a >> 5
   >> Output>> 125

 Input any number and display it's Square.
--------------------------------------------------------
  
    CLS
    INPUT "Enter any value to b"; b
    LET d=b*b
    PRINT "Square="; d
    END

  >> Output>> Enter any value to b >> 5
  >> Output >> 25


Comments

Post a Comment

Popular posts from this blog

About RAM

Class and object in c++