Posts

Operation on Digits with SUB and FUNCTION Procedure

1. WAP to find the sum of digits. => 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 DIGITS = "; S      END SUB =>DECLARE FUNCTION SUM(N)      CLS      INPUT "ENTER ANY NUMBER"; N      PRINT "SUM OF DIGITS = "; SUM(N)      END      FUNCTION SUM(N)      S = 0      WHILE N<>0      R = N MOD 10      S= S+R      N = N \10      WEND      SUM = S      END FUNCTION ____________________________...

SUB PROCEDURE AND FUNCTION PROCEDURE IN USE

* 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 HEMI(R)    END    SUB CYL(R, H)    VOL1 = 22/7*R^2*H    PRINT " VOLUME OF CYLINDER = " VOL1    END SUB    SUB HEMI(R)    VOL2 = 2/3*22/7*R^3    PRINT "VOLUME OF HEMISPHERE = "; VOL2    END SUB > DECLARE FUNCTION CYL(R, H)    DECLARE FUNCTION HEMI (R)    CLS    INPUT "ENTER RADIUS "; R    INPUT "ENTER HEIGHT OF CYLINDER"; H    PRINT "VOLUME OF CYLINDER = " ; CYL(R,H)    PRINT "VOLUME OF HEMISPHERE = "; HEMI(R)    END    FUNCTION CYL(R, H)    CYL = 22/7*R^2*H    END FUNCTION    FUNCTION HEMI(R)  ...

Educational Tour 2073

Image
Day 1 - This day, we all assembled at the school territory at sharp 7 and got ready to learn new things. Despite of our early arrival some factors changed our departure time. We were embarrassed to leave at 8 o'clock. Our destination for the day was Gorkha. Due to traffic jam in many places we were able to enter Gorkhali land only at 5. So when we reached Gorkha museum it was closed. As it was Prithvi Jayanti we went to Gorkha Durbar. We admired the architecture of the palace. We clicked some photographs and returned to headquarters through Ram Shah Chautara. SUNSET AS SEEN FROM GORKHA DURBAR Day 2 - We woke up at 5 in the morning. Took 2 hour long bus ride to reach Tanahun. There we took tea break.After that we walked up the stairs to reach Siddha Gufa. It was a huge cave with different natural artistic pieces. There was a natural AC through which we could feel hot in winter and cold in summer season. We were impressed by the saint meditating over there in such dark plac...

QBASIC Programming

WAPs to display : 1. K     KA     KAT     KATH     KATHM     KATHMA     KATHMAN     KATHMAND     KATHMANDU =>CLS     A$ = "KATHMANDU"     FOR I = 1 TO LEN(A$)     PRINT LEFT$ (A$, I)     NEXT I     END 2. U    DU    NDU    ANDU   MANDU    HMANDU     THMANDU    ATHMANDU     KATHMANDU =>CLS    A$ =" KATHMANDU "    FOR I = 1 TO LEN(A$)       PRINT RIGHT$(A$, I)       NEXT I     END 3.KATHMANDU   KATHMAND    KATHMAN    KATHMA     KATHM     KATH   KAT    KA   K =>CLS    A$ =" KATHMANDU "    FOR I = LEN(A$)  TO 1 STEP - 1    PRINT LEFT$(A$, I)      NEXT I  ...

Fourth Generation Language (4GL)

What : Fourth Generation Language is a computer programming language also known as a refined version of Third Generation Language (3GL). Every generation of language tries to help programmers feel comfortable while coding and have vast information about internal parts of computer making it user-friendly. 4GL tries to focus on large member of data unlike on bits or bytes. It supports database management, report generation, mathematical optimization, GUI development or web development. Some experts classify it as a subset of domain specific language. When : 4GL was first used formally by James Martin in his book Applications Development Without Programmers which was published in 1982 to refer to non-procedural language. In some way early 4GLs were used in MARK-IV and MAPPER. In a sense 4GL is an example of "black box" processing, each geberation is further from the machine. Being far from machine implies being closer to the domain. Given the wide disparity of concepts and me...