Monday, June 27, 2016


1) WAP to change degree Celsius into degree Fahrenhiet.
      CLS
      INPUT "Enter degree celsius value" ; D
      F = ( 9 * C / 5 ) + 32
      PRINT "Degree Fahrenheit value = "; F
      END

2) WAP to change dollar into Nepali currency.
      CLS
      INPUT "Enter Dollar value"; USD
      NRS = USD * 100
      PRINT "Nepali currency value = "; NRS
      END

3) WAP to change Indian currency into Nepali currency.
      CLS
      INPUT "Enter Indian currency value"; IC
      NRS = IC * 1.6
      PRINT "Nepali currency value = "; NRS
      END

5) WAP to change minutes into hours and minutes.
      CLS
      INPUT "Enter total minutes"; M
      H = M \ 60
      MIN = M MOD 60
      PRINT "Total hours = " ; H
      PRINT "Remaining minutes = "; M
      END



6) WAP to find the area of rectangle.

     CLS
      INPUT "Enter length" ; L
      INPUT "Enter breadth" ; B
      A = L * B
      PRINT "Area of rectangle = "; A
      END

7) WAP to find the area of square.

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


8) WAP to find the area of circle.

      CLS
       INPUT "Enter radius"; R
      CONST PI =22/7
      A = PI * R ^2
      PRINT "Area of circle = "; A
      END
9) WAP 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

10) WAP to find the area of parallelogram.
      CLS
      INPUT "Enter base"; B
      INPUT "Enter height"; H
      A = B * H
      PRINT "Area of parallelogram "; A
      END

 11) WAP to check whether the number is divisible by 3 and 7 or not.
     CLS
      INPUT "Enter any number"; A
      R1 = A MOD 3
      R2 = A MOD 7
      IF R1 = 0 AND R2 = 0 THEN
      PRINT "Number is divisible by 3 and 7"
      ELSE
      PRINT "Number is not divisible by 3 and 7"
      END IF
      END


12)  WAP to check whether the given number is positive/ negative/ zero.
      CLS
      INPUT "Enter any number"; A
      IF A >0 THEN
      PRINT "Number is positive"
      ELSEIF A <0 THEN
      PRINT "Number is negative"
      ELSE
      PRINT "Number is zero"
      END IF
      END

13) WAP to check whether the number is odd or even.
     CLS
      INPUT "Enter any number" ; A
      R = A MOD 2
      IF R = 1 THEN
      PRINT "Number is odd"
      ELSE
      PRINT "Number is even"
      END IF
      END

14) WAP to enter any 3 numbers and find the smallest one.
     CLS
      INPUT "Enter any three numbers" ; A, B, C
      IF A< B AND A< C THEN
      PRINT A ; " is the smallest number."
      ELSEIF B<A AND B<C THEN
      PRINT B ; " is the smallest number."
      ELSEIF C<A AND C<B THEN
      PRINT C ; " is the smallest number."
      ELSE
      PRINT "All the numbers are equal."
      END IF
      END

15) WAP to enter name and percentage and print the name, percentage and the division passed in.
      CLS
      INPUT "Enter name"; N$
      INPUT "Enter percentage"; P
      IF P>= 80 AND P<=100 THEN
      D$ = "Distinction"
      ELSEIF P>= 60 AND P<=69.9 THEN
      D$ = "First Division"
      ELSEIF P>=50 AND P<= 59.9 THEN
      D$ = "Second Division"
      ELSEIF P>=40 AND P<=49.9 THEN
      D$ = "Third Division"
      ELSEIF P<40 THEN
      D$ = "Failed"
      ELSE
      D$ = "Wrong Entry"
      END IF
      PRINT "Name", "Percentage", "Division"
      PRINT N$, P, D$

      END