Saturday, June 24, 2017

PROGRAM BY SUB AND FUNCTION PROCEDURE

  • WAP  TO FIND SUM OF DIGIT

  =>  DECLARE SUB SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
CALL  SUM(N)
END

SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10\
S=S+R
N=N \ 10
WEND
PRINT" SUM OF DIGIT=";S
END SUB

   =>DECLARE FUNCTION SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
PRINT" SUM OF DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>O
R=N MOD 10
S=S+R
N=N\10
WEND
 SUM=S
END FUNCTION


  • WAP  FIND THE SQUARE OF DIGIT

   =>DECLARE  SUB SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END

SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10
S= S+R^2
N= N\10
WEND
PRINT" SUM OF SQUARE DIGIT=";S
END SUB

=>DECLARE FUNCTION SUM(N)
CLS
INPUT " ENTER ANY NUMBER ";N
PRINT " SUM OF SQUARE OF DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>0
R=N MOD 10
S=S+R^2
N = N\10
WEND
SUM = S
END FUNCTION




  • WAP  FIND THE CUBE OF DIGIT


   =>DECLARE  SUB SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END

SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10
S= S+R^3
N= N\10
WEND
PRINT"SUM OF CUBE OF DIGIT=";S
END SUB

=>DECLARE FUNCTION SUM(N)
CLS
INPUT " ENTER ANY NUMBER ";N
PRINT " SUM OF CUBE OF DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>0
R=N MOD 10
S=S+R^2
N = N\10
WEND
SUM =S
END FUNCTION


  • WAP TO REVERSE THE DIGIT 
=>DECLARE SUB REV(N)
CLS
INPUT" ENTER ANY NUMBER";N
CALL REV(N)
END

SUB REV(N)
S=0
WHILE N<>0
R=N MOD 10
S=S*10+R
N= N\10
WEND 
PRINT " REVERSED DIGIT=";S
END SUB

=> DECLARE FUNCTION REV(N)
CLS
INPUT" ENTER ANY NUMBER";N
PRINT "REVERSED DIGIT=";REV(N)
END

FUNCTION REV(N)
S=0 
WHILE N<>0
R=N MOD 10
S=S*10+R
N= N\10
WEND
REV=S
END FUNCTION


  • WAP TO CHECK WHETHER THE GIVEN NUMBER IS PALLINDROME OR NOT.

=> DECLARE SUB PAL(N)
CLS
INPUT" ENTER ANY NUMBRE";N
CALL PAL(N)
END

SUB PAL(N)
A=N
S=O
WHILE N<>0
R= N  MOD 10
S=S*10 +R
N =N\10
WEND
IF S=A THEN
PRINT " THE NUMBER IS PALLINDROME"
ELSE
PRINT" THE NUMBER IS NOT PALLINDROME"
END IF 
END SUB

=>DECLARE FUNCTION PAL(N)
CLS
INPUT" ENTER ANY NUMBER";N
A=N
IF A=PAL(N) THEN
PRINT" ENTER ANY NUMBER IS PALLINDROME;
ELSE 
PRINT"THE NUMBER IS NOT PALLINDROME"
END

FUNCTION PAL(N)
S=0
WHILE<>0
R=N MOD 10
S=S*10+R
N=N\10
WEND
PAL=S
END FUNCTION

  • WAP TO CHECK WHETHER THE GIVEN NUMBER IS ARMSTRONG OR NOT.
=> DECLARE SUB ARM (N)
CLS
INPUT" ENTER ANY NUMBRE";N
CALL ARM(N)
END

SUB ARM(N)
S=O
A=N
WHILE N<>0
R= N  MOD 10
S=S +R^3
N= N\10
WEND
IF A=S THEN
PRINT " THE NUMBER IS ARMSTRONG"
ELSE
PRINT" THE NUMBER IS NOT ARMSTRONG"
END IF 
END SUB




=>DECLARE FUNCTION ARM(N)CLSINPUT" ENTER ANY NUMBER";NA=NIF A=ARM(N) THEN

PRINT " THE NUMBER IS ARMSTRONG"
ELSE 
PRINT" THE NUMBER IS NOT ARMSTRONG"
END IF
END

FUNCTION ARM(N)S=0WHILE<>0R=N MOD 10S=S+R^3N=N\10WENDARM=SEND FUNCTION



  • WAP TO FIND THE SUM OF EVEN DIGIT ONLY


=>  DECLARE SUB SUM(N)

CLS
INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END

SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10\
IF R MOD 2=0 THEN S=S+R
N=N \ 10
WEND
PRINT" SUM OF EVEN DIGIT=";S
END SUB

   =>DECLARE FUNCTION SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
PRINT" SUM OF EVEN DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>O
R=N MOD 10
IF R MOD 2= O THEN S=S+R
N=N\10
WEND
 SUM=S
END FUNCTION


  • WAP TO FIND THE SUMOF ODD DIGIT ONLY
=>  DECLARE SUB SUM(N)
CLS                                                                                                                                                     INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END


SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10\
IF R MOD 2=1 THEN S=S+R
N=N \ 10
WEND
PRINT" SUM OF ODD DIGIT=";S
END SUB

   =>DECLARE FUNCTION SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
PRINT" SUM OF ODD DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>O
R=N MOD 10
IF R MOD 2= 1 THEN S=S+R
N=N\10
WEND
 SUM=S
END FUNCTION


  • WAP TO FIND THE SUM OF SQUARE OF EVEN DIGIT ONLY

=> DECLARE SUB SUM(N)

CLS

INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END

SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10
IF R MOD 2=0 THEN S=S+R^2
N=N \ 10
WEND
PRINT" SUM OF SQUARE OF EVEN DIGIT=";S
END SUB

   =>DECLARE FUNCTION SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
PRINT" SUM OF SQUARE OF EVEN DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>O
R=N MOD 10
IF R MOD 2= O THEN S=S+R^2
N=N\10
WEND
 SUM=S
END FUNCTION


  • WAP TO FIND THE SQUAREOF ODD DIGIT ONLY
=>  DECLARE SUB SUM(N)
CLS                                                                                                                                                     INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END


SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10
IF R MOD 2=1 THEN S=S+R^2
N=N \ 10
WEND
PRINT" SUM OF SQUARE OF  ODD DIGIT=";S
END SUB

   =>DECLARE FUNCTION SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
PRINT" SUM OF SQUARE OF ODD DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>O
R=N MOD 10
IF R MOD 2= 1 THEN S=S+R^2
N=N\10
WEND
 SUM=S
END FUNCTION


  • WAP TO FIND THE SUM OF CUBE OF EVEN DIGIT ONLY

=> DECLARE SUB SUM(N)

CLS

INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END

SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10
IF R MOD 2=0 THEN S=S+R^3
N=N \ 10
WEND
PRINT" SUM OF CUBE OF EVEN DIGIT=";S
END SUB

   =>DECLARE FUNCTION SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
PRINT" SUM OF CUBE OF EVEN DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>O
R=N MOD 10
IF R MOD 2= O THEN S=S+R^3
N=N\10
WEND
 SUM=S
END FUNCTION


  • WAP TO FIND THE CUBE OF ODD DIGIT ONLY
=>  DECLARE SUB SUM(N)
CLS                                                                                                                                                     INPUT" ENTER ANY NUMBER ";N
CALL SUM(N)
END


SUB SUM(N)
S=0
WHILE N<>0
R= N MOD 10
IF R MOD 2=1 THEN S=S+R^3
N=N \ 10
WEND
PRINT" SUM OF CUBE OF  ODD DIGIT=";S
END SUB

   =>DECLARE FUNCTION SUM(N)
CLS
INPUT" ENTER ANY NUMBER ";N
PRINT" SUM OF CUBE OF ODD DIGIT=";SUM(N)
END

FUNCTION SUM(N)
S=0
WHILE N<>O
R=N MOD 10
IF R MOD 2= 1 THEN S=S+R^3
N=N\10
WEND
 SUM=S
END FUNCTION



  • WAP TO COUNT TOTAL DIGIT
=>DECLARE SUM OF TOT(N)
CLS
INPUT"ENTER ANY NUMBER";N
CALL TOT(N)
 END

SUB TOT(N)
S=0
WHILE N<>0
R=R MOD 10
S=S+1
N=N\10
WEND
PRINT "TOTAL DIGIT=";S
END SUB

=>DECLARE FUNCTION TOT(N)
CLS
INPUT" ENTER ANY NUMBER";N
PRINT"TOTAL DIGIT=";TOT(N)
END

FUNCTION TOT(N)
S=0
WHILE N<>0
S=S+1
N=N\10
WEND
TOT=S
END FUNCTION

  • WAP TO COUNT TOTAL EVEN  DIGIT
=>DECLARE SUM OF TOT(N)
CLS
INPUT"ENTER ANY NUMBER";N
CALL TOT(N)
 END

SUB TOT(N)
S=0
WHILE N<>0
R=R MOD 10
IF R MOD 2=0 THEN S=S+1
N=N\10
WEND
PRINT "TOTAL EVEN DIGIT=";S
END SUB

=>DECLARE FUNCTION TOT(N)
CLS
INPUT" ENTER ANY NUMBER";N
PRINT"TOTAL EVEN DIGIT=";TOT(N)
END

FUNCTION TOT(N)
S=0
WHILE N<>0
R=R MOD 10
IF R MOD 2=0 THEN S=S+1
N=N\10
WEND
TOT=S
END FUNCTION

  • WAP TO COUNT TOTAL ODD  DIGIT
  • =>DECLARE SUM OF TOT(N)
    CLS
    INPUT"ENTER ANY NUMBER";N
    CALL TOT(N)
     END

    SUB TOT(N)
    S=0
    WHILE N<>0
    R=R MOD 10
    IF R MOD 2=1 THEN S=S+1
    N=N\10
    WEND
    PRINT "TOTAL ODD DIGIT=";S
    END SUB

    =>DECLARE FUNCTION TOT(N)
    CLS
    INPUT" ENTER ANY NUMBER";N
    PRINT"TOTAL ODD DIGIT=";TOT(N)
    END

    FUNCTION TOT(N)
    S=0
    WHILE N<>0
    R=R MOD 10
    IF R MOD 2=1 THEN S=S+1
    N=N\10
    WEND
    TOT=S
    END FUNCTION

    Saturday, May 13, 2017

     (SUB PROCEDURE)


    #WAP to find the volume of cylinder and hemisphere
    >DECLARE SUB CYL( R, H)
      DECLARE SUB HEMI(R)
      CLS
      INPUT" ENTER RADIUS"; R
      INPUT" ENTER HEIGHT OF CYLINDER"; H
    CALL CYL( R, H)
     CALL HEMMI(R)
     END

     SUB CYL (R , H)
     VOL=22/7*R^2*H
     PRINT" VOLUME OF CYLINDER ="; VOL
     END SUB

     SUB HEMI(R)
     H= 2/3*22/7*R^3
     PRINT "VOLUME OF HEMISPHERE ="; H
    END SUB

    #WAP to convert Nepali currency into US dollar.
     >DECLARE SUB D(NC)
      CLS
     INPUT "ENTER NEPALI CURRENCY  VALUE";NC
     CALL D (NC)
     END

     SUB D(NC)
    US = NC/109
     PRINT" AMERICAN DOLLAR ="; US
     END SUB

    #WAP to find area of sphere
     >DECLARE SUB AREA(R)
      CLS
     INPUT "ENTER RADIUS OF SPHERE";R
     CALL AREA (R)
     END

     SUB AREA(R)
     A= 4*22/7*R^2
     PRINT "AREA OF SPHERE=";A
     END SUB

    #WAP  to convert US dollar into Nepali currency.
     > DECLARE SUB NC(US)
     CLS
     INPUT'ENTER AMERICAN DOLLAR VALUE";US
     CALL NC( US)
     END

     SUB NC (US)
     N= US*109
     PRINT 'NEPALI CURRENCY VALUE=";N
     END SUB
     
     #WAP convert area and volume of box.
     > DECLARE SUB AREA (L,B,H)
      DECLARE SUB VOLUME(L,B,H)
     CLS
     INPUT" ENTER LENGHT"; L
     INPUT" ENTER BREADTH"; B
     INPUT" ENETER HEIGHT ";H
     CALL AREA (L,B,H)
     CALL VOLUME (L,B,H)
     END

     SUB AREA (L,B,H)
     A= 2*(L*B+B*H+L*H)
     PRINT" AREA OF BOX=";A
     END SUB

     SUB VOLUME (L,B,H)
     V=L*B*H
     PRINT "VOLUME OF BOX=";V
     END SUB

    # WAP to calculate total surface area of sphere.
     >DECLARE SUB TSA(R)
     CLS
     INPUT 'ENTER RADIUS";R
     CALL TSA (R)
     END

     SUB TSA(R)
     A=2*22/7*R^2
     PRINT " TOTAL SURFACE AREA OF SPHERE=";A
     END SUB

    # WAP to calculate potential energyof a body
     > DECLARE SUB PTL(M,H)
     CLS
     INPUT" ENTER MASS";M
     INPUT" ENTER HEIGHT";H
     CALL PTL(M,H)
     END

     SUB PTL(M,H)
     P=M*H*9.8
     PRINT" POPTENTIAL ENERGY =";P
     END SUB

    #WAP to convert Nepali currency into Indian currency. 
     > DECLARE  SUB IC(NC)
     CLS
     INPUT"ENTER NEPALI CURRENCY VALUE";NC
     CALL IC(NC)
     END

     SUB IC(NC)
     I=NC/1.6
     END SUB


     (FUNCTION PROCEDURE)


    #WAP to find the volume of cylinder and hemisphere
    >DECLARE FUNCTION CYL( R, H)
      DECLARE FUNCTION HEMI(R)
      CLS
      INPUT" ENTER RADIUS"; R
      INPUT" ENTER HEIGHT OF CYLINDER"; H

     END

     FUNCTION CYL (R , H)
     VOL=22/7*R^2*H
     PRINT" VOLUME OF CYLINDER ="; VOL
     END FUNCTION

     FUNCTION HEMI(R)
     H= 2/3*22/7*R^3
     PRINT "VOLUME OF HEMISPHERE ="; H
    END FUNCTION

    #WAP to convert Nepali currency into US dollar.
     >DECLARE FUNCTION D(NC)
      CLS
     INPUT "ENTER NEPALI CURRENCY  VALUE";NC
     END

     FUNCTION D(NC)
    US = NC/109
     PRINT" AMERICAN DOLLAR ="; US
     END FUNCTION

    #WAP to find area of sphere
     >DECLARE FUNCTION AREA(R)
      CLS
     INPUT "ENTER RADIUS OF SPHERE";R
    END

     FUNCTION AREA(R)
     A= 4*22/7*R^2
     PRINT "AREA OF SPHERE=";A
     END FUNCTION

    #WAP  to convert US dollar into Nepali currency.
     > DECLARE FUNCTION NC(US)
     CLS
     INPUT'ENTER AMERICAN DOLLAR VALUE";US
     END

     FUNCTION NC (US)
     N= US*109
     PRINT 'NEPALI CURRENCY VALUE=";N
     END FUNCTION

     #WAP convert area and volume of box.
     > DECLARE FUNCTION AREA (L,B,H)
      DECLARE FUNCTION VOLUME(L,B,H)
     CLS
     INPUT" ENTER LENGHT"; L
     INPUT" ENTER BREADTH"; B
     INPUT" ENETER HEIGHT ";H
     END

     FUNCTION AREA (L,B,H)
     A= 2*(L*B+B*H+L*H)
     PRINT" AREA OF BOX=";A
     END FUNCTION

     FUNCTION VOLUME (L,B,H)
     V=L*B*H
     PRINT "VOLUME OF BOX=";V
     END FUNCTION

    # WAP to calculate total surface area of sphere.
     >DECLARE FUNCTION TSA(R)
     CLS
     INPUT 'ENTER RADIUS";R
     END

     FUNCTION TSA(R)
     A=2*22/7*R^2
     PRINT " TOTAL SURFACE AREA OF SPHERE=";A
     END FUNCTION

    # WAP to calculate potential energyof a body
     > DECLARE FUNCTION PTL(M,H)
     CLS
     INPUT" ENTER MASS";M
     INPUT" ENTER HEIGHT";H
     END

     FUNCTION PTL(M,H)
     P=M*H*9.8
     PRINT" POPTENTIAL ENERGY =";P
     END FUNCTION

    #WAP to convert Nepali currency into Indian currency. 
     > DECLARE  FUNCTION IC(NC)
     CLS
     INPUT"ENTER NEPALI CURRENCY VALUE";NC
     END

     FUNCTION IC(NC)
     I=NC/1.6
     END FUNCTION


    Sunday, February 5, 2017

    tour of grade 9

    "Educational tour for grade 9"

      Day -1

      I woke up at 5:00 and stared to pack my things for my tour. Then I went to school at 6:30 .After everyone gathered in the school we started our journey at 7:00 to our first destination Gorkha. Before reaching to Gorkha we picked up Deepak sir from his stop and again we started our journey in our journey we suffered from traffic jam up to 1:00 hour or more I guess. We toke breakfast at 10:00am. We also saw many hill's, river's, lake and hydro projects from Kathmandu to gorkha. Then after reaching Gorkha we visited Gorkha palace but we could not reach to Aanapurna museum due to the lack of time so we went to our hotel and toke a rest for a while and we were thinking to go for evening walk but we needed to postpone. after that we take dinner and went to bed at 11

      Day-2

      I woke up at 5am and washed my face and brushed my teeth. After that my roommate also waked up after that we drank tea and milk. Then we directly went to siddha goofa. It toke 1hour to reach siddha goofa. After that 1hrs walking through the stairs we finally reached siddha goofa. In siddha goofa we saw the art of nature, natural AC and a person who only drink milk. We also did many things like rapling, rope climbing etc. Then we went to pokhara directly. And we went to take lunch and after that we went to Gopteshwor cave and there also we felt the natural AC and a stone cow which gives milk. After that we went to our hotel and toke some rest at the hotel then we went to lake side for evening walk. After that we went to eat and we went to sleep at 11.

      Day -3

      We woke at 5 after that we quickly went to sarangkot to see the sunrise we saw that bright light from the sun that glowed the beauty of mountain. At the sunrise we saw machhapuchhre, Anapurna mountain . Then we went to visit bindhabasini temple to pray we came down from the temple and we ate our lunch and went to bus and startedto cost the famous places like Mahindra cave, Bat's cave and many more. After that we went to Ghandruk. It took 2hrs to reach the hotel. At the way of the hotel we saw a waterfal and we toke a break and we refreshed ourselves by the cool water coming out from that water fall after that we went to our hotel to eat our dinner and to sleep.

      Day -4

      We woke up at 5:00and started to leave the hotel. After that we move on and visited again pokhara and went to Devi's fall. After that we went to museum where we saw many statue of the people who lives in Himalayan region like gurungs, Sherpa, tharuetc we saw pic of mountain which where clicked by professionals and a yeti of the story. After that we went to see set nadi force and the sound of the river. Then we went to fewa lake and we worshipped Maha Dev temple at the middle of fewa lake. After that we stuff our stomach with mo:mo then again we toke a walk at lake side. Then we entered the hotel toke our meal and went to bed.

      Day-5

      We woke at 6am and we left the hotel at 7am because it was the last day we did needed to wake up early as usual . After that we went to siddhi stupa. And worshipped Gautam Buddha and we went to bus and left pokhara and came back to ktm. Before going to ktm we toke our snack at the hotel. Then we entered the border of ktm. One by one our friends left the bus in their stop and then my stop came and I also left the bus and then after reaching home I told the thing's that we I did in the 5 days tour to KTM to pokhara.

    Friday, January 27, 2017



    "Educational tour for grade 9"


    Day -1


         I woke up at 5:00 and stared to pack my things for my tour. Then I went to school at 6:30 .After everyone gathered in the school we started our journey at 7:00 to our first destination Gorkha. Before reaching to Gorkha we picked up Deepak sir from his stop and again we started our journey in our journey we suffered from traffic jam up to 1:00 hour or more I guess. We toke breakfast at 10:00am. We also saw many hill's, river's, lake and hydro projects from Kathmandu to gorkha. Then after reaching Gorkha we visited Gorkha palace but we could not reach to Aanapurna museum due to the lack of time so we went to our hotel and toke a rest for a while and we were thinking to go for evening walk but we needed to postpone. after that we take dinner and went to bed at 11



    Day-2
            I woke up at 5am and washed my face and brushed my teeth. After that my roommate also waked up after that we drank tea and milk. Then we directly went to siddha goofa. It toke 1hour to reach siddha goofa. After that 1hrs walking through the stairs we finally reached siddha goofa. In siddha goofa we saw the art of nature, natural AC and a person who only drink milk. We also did many things like rapling, rope climbing etc. 
    Then we went to pokhara directly. And we went to take lunch and after that we went to Gopteshwor cave and there also  we felt  the natural AC and a stone cow which gives milk. After that we went to our hotel and toke some rest at the hotel then we went to lake side for evening walk. After that we went to eat and we went to sleep at 11.






    Day -3
              We woke at 5 after that we quickly went to sarangkot to see the sunrise we saw that bright light from the sun that glowed the beauty of mountain. At the sunrise we saw machhapuchhre, Anapurna mountain . Then we went to visit bindhabasini temple to pray we came down from the temple and we ate our lunch and went  to bus and startedto cost the famous places like Mahindra cave, Bat's cave and many more. After that we went to Ghandruk.  It took 2hrs to reach the hotel. At the way of the hotel we saw a waterfal and we toke a break and we  refreshed ourselves by the cool water coming out from that water fall after that we went to our hotel to  eat our dinner and to sleep.
       



    Day -4 
                We woke up at 5:00and started to leave the hotel. After that we move on and visited again pokhara and went to Devi's fall. After that we went to museum where we saw many statue of the people who lives in Himalayan region like gurungs, Sherpa, tharuetc we saw pic of mountain which where clicked by professionals and a yeti of the story. After that we went to see set nadi force and the sound of the river. Then we went to fewa lake and we worshipped Maha Dev temple at the middle of fewa lake. After that we stuff our stomach with mo:mo then again we toke a walk at lake side. Then we entered the hotel toke our meal and went to bed.


    Day-5
            We woke at 6am and we left the hotel at 7am because it was the last day we did needed to wake up early as usual . After that we went to siddhi stupa. And worshipped Gautam Buddha and we went to bus and left pokhara and came back to ktm. Before going to ktm we toke our snack at the hotel.  
    Then we entered the border of ktm. One by one our friends left the bus in their stop and then my stop came and I also left the bus and then after reaching home I told the thing's that we I did in the 5 days tour to KTM to pokhara.
                                       😁***😁

    Monday, June 20, 2016

    Q.1) 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

    Q.2) WAP to find the area of square.

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

    Q.3) 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

    Q.4) 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

    Q.5) 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

    Q.6) 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

    Q.7)  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

    Q.8) 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

    Q.9) 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

    Q.10) 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

    Sunday, May 8, 2016

    In the topic mothers day




    My mother biodata:-
    My mother name is bimala shrestha. She is 46 years old. She is very stick but clear from heart. She is loved by every elder person and she is the most loveable person in our neighborhood. She is very kind and helpful. 

    Poem on mother:-
    images.jpg


    Wednesday, February 10, 2016

    Programming)1. WAP to find the are of four walls.=> CLS     INPUT "Enter length"; l     INPUT "Enter breadth"; b     INPUT "Enter height"; h     A = 2 * h* (l + b)     PRINT "Area of four walls = "; A     END
    2. WAP to display are of triangle.=> CLS     INPUT "Enter height"; h     INPUT "Enter base"; b     A =1/2 * b * h     PRINT "Area of triangle = "; A     END
    3. WAP to display area of parallelogram.=> CLS     INPUT "Enter base"; b     INPUT "Enter height"; h     A = b * h     PRINT "Area of parallelogram = "; A     END
    4. WAP to display volume of cylinder.=> CLS     INPUT "Enter radius of base "; b     INPUT "Enter height of cylinder" ; h     V = 22/7 * r ^ 2 * h     PRINT "Volume of cylinder ="; V     END
    5. WAP to display TSA of sphere.=> CLS     INPUT "Enter radius" ; r     TSA = 4 * 22/7 * r ^ 2     PRINT "Total surface Area ="; TSA     END
    6. WAP to display volume of sphere.=> CLS     INPUT "Enter radius"; r     V = 4/3 * 22/7 * r ^ 3     PRINT "Volume of sphere ="; V     END
    7. WAP to display volume of hemisphere.=> CLS     INPUT "Enter radius"; r     V = 2/3 * 22/7 * r ^ 3     PRINT "Volume of hemisphere ="; V     END
    8. WAP tp display TSA of cylinder.=> CLS     INPUT "Enter radius"; r     INPUT "Enter height" ; h     TSA = 2 * 22/7 * r * (r + h)     PRINT "Total Surface Area = "; TSA     END
    9. WAP to display volume of cylinder.=> CLS     INPUT "Enter radius"; r     INPUT "Enter height"; h     V = 22/7 * r ^2 * h     PRINT "Volume of cylinder = "; V     END
    10. WAP to check whether the given number is divisible by 5 or not.=> CLS     INPUT "Enter any number"; A     R = A MOD 5     IF R = 0 THEN PRINT "Number is divisible by 5" ELSE PRINT "Number is not divisible by 5"     END
    11. WAP to check whether the given number is divisible by 4 and 5 or not.=> CLS     INPUT "Enter any number"; A     R1 = A MOD 4     R2 = A MOD 5     IF R1 = 0 AND R2 = 0 THEN PRINT "Number is divisible by 4 and 5" ELSE PRINT "Number is     not divisible by 4 and 5"     END
    12. WAP to check whether the given number is a multiple of 10 or not.=> CLS     INPUT "Enter any number"; A     R = A MOD 10     IF R = 0 THEN PRINT "Number is a multiple of 10" ELSE PRINT "Number is not a multiple of        10"     END
    13. WAP to check whether the given number is odd or even.=> CLS     INPUT "Enter any number"; A     R = A MOD 2     IF R = 0 THEN PRINT "Number is even" ELSE PRINT "Number is odd"     END
    14. WAP TO check whether the given number is divisible by 7 or not.=> CLS     INPUT "Enter any number"; A     R = A MOD 7     IF R = 0 THEN PRINT "Number is divisible by 7" ELSE PRINT "Number is not divisible by 7"     END
    15. WAP to check whether the given number is positive, negative or zero.=> CLS     INPUT "Enter any number"; A     IF A>0 THEN     PRINT A ; " is positive number"     ELSEIF A<0 THEN     PRINT A ; " is negative number"     ELSE     PRINT A ; " is zero"     END IF     END
    16. WAP to display the greatest number among three numbers.=> CLS     INPUT "Enter any 3 numbers"; A, B, C     IF A>B AND A>C THEN     PRINT A ; "is greatest number"     IF B >A AND B>C THEN     PRINT B ; "is greatest number"     ELSE     PRINT C : " is greatest number"     END IF     END
    17. WAP to display the smallest number among three numbers.=> CLS     INPUT "Enter any 3 numbers"; A, B, C     IF A<B AND A<C THEN     PRINT A ; "is smallest number"     IF B <A AND B<C THEN     PRINT B ; "is smallest number"     ELSE     PRINT C : " is smallest number"     END IF     END
    18. WAP to enter secured percentage and display the division.=> CLS     INPUT "Enter secured percentage"; P     IF P>= 60 THEN     PRINT "You have passed in first division"     ELSEIF P>=50 AND P<=59.9 THEN     PRINT "You have passed in second division"     ELSEIF P>=40 AND P<=49.9 THEN     PRINT "You have passed in third division"     ELSE     PRINT "You have failed"     END IF     END
    19. WAP to enter age and give advice accordingly.=> CLS     INPUT "Enter age"; A     IF A<15 THEN     PRINT "You are young, study hard"     ELSEIF A>=15 AND A<=30 THEN     PRINT "You are adult, work hard"     ELSEIF A>=31 AND A<=60 THEN     PRINT "You are mature, work slowly"     ELSE     PRINT "You are old, take rest"     END IF     ENDprogaramming-1 WAP to display area of rectangle.=> CLS     INPUT "Enter length" ; l     INPUT "Enter breadth" ; b     A = l * b     PRINT "Area of rectangle = "; A     END
    2. WAP to display area of square.=>CLS    INPUT "Enter length" ; l    A = l ^ 2    PRINT "Area of square = " ; A    END
    3. WAP to display area of circle.=>CLS    INPUT "Enter radius" ; r    A =  22/7 ^ 2    PRINT "Area of circle = " ; A    END
    4. WAP to display perimeter of rectangle.=>CLS    INPUT "Enter length" ; l    INPUT "Enter breadth" ; b    P = 2 * (l + b)    PRINT "Perimeter of rectangle  = " ; P    END
    5. WAP to display perimeter of square.=>CLS    INPUT "Enter length" ; l    P = 4 * l    PRINT "Perimeter of square = " ; P    END
    6. WAP to find circumference of circle.=>CLS    INPUT "Enter radius" ; r    C = 2 * 22 / 7 * r    PRINT "Circumference of circle = "; C    END
    7. WAP to find area and perimeter of rectangle.=>CLS    INPUT "Enter length" ; l    INPUT "Enter breadth " ; b    A = l * b    P = 2 * ( l + b )    PRINT "Area of rectangle = "; A    PRINT "Perimeter of rectangle = "; P    END
    8. WAP to find area and perimeter of square.=>CLS    INPUT "Enter length" ; l    A = l ^ 2    P = 4 * l    PRINT "Area of square = "; A    PRINT "Perimeter of square = "; P    END
    9. WAP to find area and circumference of circle.=>CLS    INPUT "Enter radius "; r    A = 22/7 * r ^ 2    C = 2 * 22/ 7 * r    PRINT "Area of circle = "; A    PRINT "Circumference of circle = "; C    END

    Saturday, November 21, 2015

    My Dashain Experience

    This time to celebrate Dashain I went to my maternal uncle's house. I celebrated my Dashain over there along with my grand parents, uncle-aunt, brother and my parents. I played swing and ate many selrotis that made me suffer from stomach pain. Before going to my uncle's house I visited many historic places like NarayanHiti Raj Durbar, Hanuman Dhoka and so on. I visited New Road for shopping along with my parents. I ate lots of burgers and sandwich. I collected the total sum of 1,015 NRs as dakshina given by my elders. I read many comic books for entertainment and also for learning English. I went to play football with my classmates. 

     Therefore, this Dashain was one of the epic Dashain I had ever celebrated. (No pictures as the camera fell of my hand while capturing photos)

    SLC Examination 2073

    1 Q/Ans a) -> The advantage of bus topology:- It is easy to set up computers and other devices  It requires power cable media, ...