Friday, February 28, 2014

qbasic

QBASIC PROGRAMMING



1.       Input 15 numbers and print them with their sum.

REM

CLS

DIM N(15)

FOR I = 1 TO 15

INPUT “ENTER A NUMBER”; N(I)

S=S+N(I)

NEXT I

PRINT “THE ENTERED NUMBERS ARE” :

FOR J = 1 TO 15

PRINT N(J)

NEXT J

PRINT “THE SUM IS”;S

END

 

2.       Input 20 numbers and print them in reverse order.

REM

CLS

DIM N(20)

FOR I = 1 TO 20

INPUT “ENTER A NUMBER”; N(I)

NEXT I

PRINT “THE NUMBERS IN REVERSED FORM ARE” :

FOR J = 20 TO 1 STEP -1

PRINT N(J)

NEXT J

END

 

3.       Input 25 numbers and print only even numbers with their sum.

REM

CLS

DIM N(25)

FOR I = 1 TO 25

INPUT “ENTER A NUMBER”; N(I)

NEXT I

PRINT “THE EVEN NUMBERS ARE” :

FOR J = 1 TO 25

IF N(J) MOD 2 = 0 THEN

S = S + N(J)

PRINT N(J),

END IF

NEXT J

PRINT “THE SUM IS”; S

END

 

4.       Input 20 numbers and print only even numbers.

REM

CLS

DIM N(20)

FOR I = 1 TO 20

INPUT “ENTER A NUMBER”; N(I)

NEXT I

PRINT “THE EVEN NUMBERS ARE” :

FOR J = 1 TO 20

IF N(J) MOD 2 = 0 THEN PRINT N(J)

NEXT J

END

 

5.       Input 15 numbers and print only positive numbers from the numbers given below.

10,20,-30,-40,19,45,32,-98,-78,34,-53,12,-9,-7,-8

REM

CLS

DIM N(15)

FOR I = 1 TO 15

READ N(I)

NEXT I

DATA 10,20,-30,-40,19

DATA 45,32,-98,-78,34

DATA -53,12,-9,-7,-8

PRINT “THE POSITIVE NUMBERS ARE” :

FOR J = 1 TO 15

IF N(J) > 0 THEN PRINT N(J)

NEXT J

END

 

6.       Input 10 different names and display all whose name starts with “S”.

REM

CLS

DIM N$(10)

FOR I = 1 TO 10

INPUT “ENTER A NAME”; N$(I)

NEXT I

PRINT “THE NAMES STARTING WITH “S” ARE” :

FOR J = 1 TO 10

A$ = UCASE$(LEFT$(N$(I),1))

IF A$ = “S” THEN PRINT N$(J)

NEXT J

END
 
 
 
 

7.       Input 15 different names and display only those names whose starting and ending characters are vowels.

REM

CLS

DIM N$(15)

FOR I = 1 TO 15

INPUT “ENTER A NAME”; N$(I)

NEXT I

PRINT “THE NAMES WHOSE STARTING AND ENDING CHARACTERS ARE VOWELS ARE” :

FOR J = 1 TO 15

A$ = UCASE$(LEFT$(N$(I),1))

B$ = UCASE$(RIGHT$(N$(I),1))

IF A$ = “A” OR A$ = “E” OR A$ = “I” OR A$ = “O” OR A$ = “U” AND B$ = “A” OR B$ = “E” OR B$ = “I” OR B$ = “O” OR B$ = “U” THEN

 PRINT N$(J)

END IF

NEXT J

END

 

8.       Input 10 different numbers and display in ascending order.

REM

CLS

DIM N(10)

FOR I = 1 TO 10

INPUT “ENTER A NUMBER”; N(I)

NEXT I

FOR K = 1 TO 10

FOR J = 1 TO 10 – K

IF N(J) > N(J+1) THEN SWAP N(J) , N(J+1)

NEXT J

NEXT K

CLS

PRINT “THE NUMBERS IN ASCENDING ORDER ARE” :

FOR J = 1 TO 10

PRINT N(J)

NEXT J

END

 

9.       Input 10 different names and display in descending order.

REM

CLS

DIM N(10) AS STRING

FOR I = 1 TO 10

INPUT “ENTER THE NAME”; N(I)

NEXT I

FOR K = 1 TO 10

FOR J = 1 TO 10 – K

IF LEN(N(J)) <LEN( N(J+1)) THEN SWAP N(J) , N(J+1)

NEXT J

NEXT K

CLS

PRINT “THE NAMES IN DESCENDING ORDER ARE” :

FOR J = 1 TO 10

PRINT N(J)

NEXT J

END

 

10.   Input 15 different names of capital and country and display in ascending order according to country.

REM

CLS

DIM CN(15) AS STRING

DIM CAN(15) AS STRING

FOR I = 1 TO 15

INPUT “ENTER THE COUNTRY NAME”; CN(I)

INPUT “ENTER THE CAPITAL NAME”; CAN(I)

NEXT I

FOR K = 1 TO 10

FOR J = 1 TO 10 – K

IF LEN(CN(J)) >LEN( CN(J+1)) THEN

SWAP CN(J) , CN(J+1)

SWAP CAN(J) , CAN(J+1)

NEXT J

NEXT K

CLS

PRINT “THE NAMES IN ASCENDING ORDER ARE” :

PRINT “COUNTRY’S NAME”, “CAPITAL NAME”

FOR J = 1 TO 10

PRINT CN(J), CAN(J)

NEXT J

END

 

11.   Input 10 different names and age of students. After that the user should ask the user to input name to search data. If the name is found print the name and age of the student otherwise print “DATA NOT FOUND”.

 

REM

CLS

DIM N(10) AS STRING

DIM A(10)

FOR I = 1 TO 10)

INPUT “ENTER THE NAME”; N(I)

INPUT “ENTER HIS/HER AGE”; A(I)

NEXT I

INPUT “ENTER THE NAME TO SEARCH DATA”; S$

FLAG = 0

FOR I = 1 TO 10

IF UCASE$(S$) = UCASE$(N(I))

PRINT N(I),A(I)

FLAG = 1

END IF

NEXT I

IF FLAG = 0 THEN

PRINT “DATA NOT FOUND”

END IF

END

 

12.   Store names and marks of 15 different students and print their name, marks and division using the following condition:

Percentage                                                         Division

>=80 AND <=100                                             Distinction

>=60 AND <80                                                  First Division

>=50 AND <60                                                  Second Division

>=40 AND <50                                                  Third Division

<40                                                                         Fail

 

REM

CLS

DIM N(15) AS STRING

DIM P(15)

DIM D(15) AS STRING

FOR I = 1 TO 15

INPUT “ENTER THE NAME”; N(I)

INPUT “ENTER HIS/HER PERCENTAGE”; M(I)

NEXT I

PRINT “NAME”, “PERCENTAGE”, “DIVISION”

FOR I = 1 TO 15

IF P(I) >=80 AND P(I) <=100 THEN

D(I) = “DISTINCTION”

ELSEIF P(I) >=60 AND P(I) <80 THEN

D(I) = “FIRST DIVISION”

ELSEIF P(I) >=50 AND P(I) <60 THEN

D(I) = “SECOND DIVISION”

ELSEIF P(I) >=40 AND P(I) <50 THEN

D(I) = “THIRD DIVISION”

ELSE

D(I) = “FAIL”

END IF

PRINT N(I), P(I), D(I)

NEXT I

END

 

Monday, February 10, 2014

Know about some of the beautiful places ....

Chitlang



Beautiful Scenery of Chitlang


 
Chitlang is located to the south west of Kathmandu valley in mid-hills called Mahabharat range. Chitlang VDC is located in ancient Newar settlement. Inscriptions dating back to Lichchavi era have been found in this place. An inscription was found in Toukhel, Ward 6 of Chitlang VDC, established by king Amshubarma (in sambat 37). According to the inscription, Amshubarma had given the land to shepherds and established a settlement for shepherds in Toukhel, Nhulgaun, Kunchhal etc. of Chitlang. Some historians believe that these people called Gopalis are the descendants of rulers of Gopal era. in Chitlang there is different culture in every please, in ward no 1 there is tamang culture in waed no 2 khas, in ward no 3,4,5,10 and 6 there newari culture same as 8,7 and 9 there mixed culture. there is many visiting place like "majhagau" specally newari people and culture,swachhand bhairab  temple and satdhaea, argenacik resourte and soon.

There are so many beautiful places in Chitlang to visit. Many tourist visit Chitlang to see these places of Chitlang. There are many historical and ancient temples, stupas, Chaitya and other religious holy places in Chitlang.


 


Shivalaya:

 

 
It is an ancient temple considered to Shiva, having 3 gajuras. As a tradition, a grand festival used to be celebrated on the day Fagu- Purnima. Since new years the event has lost its activity and the temple is carving for early renovation and conservation. No evidence still found about the detail history of the temple. It’s a perfect example of stone carving same like Krishna temple of Patan, Lalitpur.
 
 
 

Chandragiri:
 
 

The little-known CHANDA GIRI (Maharabat Hills) lies on the south west of Kathmandu Valley. The area itself has much natural resources, flora and fauna developing tourism activities but has been left behind being popular tourist destination because of the lack of promotions.



Pauwa:
 

              It is an ancient structure of bricks having fine wood carving which is situated in the ward no. 2 of the village. The décor of the building reflects the tradition of Nepal’s fine art, artistry and craftsmanship. The decorative artistic pillar, tunal arts and the architectural style are the main attractions. Regularly the deteriorating state of the architecture needs urgent renovation and conservation as important resources of cultural tourism. This legendary structure is situated in the extreme northern side of Chitlang along the way the way Bhimphedi, the ancient strategic point of journey to and from Kathmandu when in the earlier day highways like Tribhuwan Rajpath did not exist then.
 

Saatdhara:
 
 

                       As the legend goes, this is the place where the gods and goddesses – Ganesh, Shiva, Krishna, Saraswoti were located and thus the term ‘Saatdhara’ is derived from the seven stone taps close to the gods. The place is surrounded by beautiful botanical forest having its setting like natural garden of mostly Katush trees. Every year on the day of Basanta Panchami, the local people celebrate colorful festival at the site of Saatdhara worshipping and paying home age to goddess Saraswoti.

Indra Sarovar:
 

 Indra Sarovar is the largest manmade lake constructed at the deep Gorge betn. Markhu & Kulekhani VDC by the Kulekhani hydro project. This is one and only hydro project based on reserve system. Several rivers are blocked by huge dam. This is 7 km. long and famous for rowing and fishery. It is in the distance of 35 km far from both Hetauda and Kathmandu. The picture shows the benefit of Water in Life: through Hydropower, through fishery business, through tourism... Etc.




Kulekhani:
 

Kulekhani is a village development committee in Makwanpur District in the Narayani Zone of southern Nepal. At the time of the 1991 Nepal census it had a population of 2972 people living in 535 individual households The Kulekhani watershed is located 50 km southwest of Kathmandu and is the source of water for the Kulekhani reservoir, which supplies water to two hydropower plants ($120 million total investment). When the reservoir was completed in 1982, it had a 100 year design life based on projected sedimentation rates. Unfortunately, due to high erosion rates and landslides in the watershed, the dead storage zone in the reservoir was filling at a rate 6 times faster than expected in the early 1990s, and the dead zone was projected to fill by 1999 or 85 years earlier than projected. An additional $40 million was required to decrease sediment loadings to the reservoir via upstream sediment trapping dams and the water intakes were modified to permit more sediment accumulation without blocking the intakes. These investments were projected to increase the life of the project by 50 years.



Bhimsen Temple:

                  This particular temple with its own significance is located at ward no. 5 of Chitlang V.D.C. It contains statue of Mahabharata epic hero Bhimsen killing demon Banasur. Although devoid of much architectural importance, yet it is regarded as an important cultural asset of the place.


Asoka Chaitya
 
It is located at ward no. 5 of Chitlang VDC. It was built by emperor Asoka of Magadh during the Kirat period, when he came to Nepal. He established several other Chaitya. Every on the day of Buddha’s birthday, Buddhist of Kathmandu valley come to Chitlang.

 

Champeshwor Mahadev Shiva:

                              This particular temple lies in ward no. 7 of Chitlang VDC. The popular Ambe jatras is celebrated every year on the first of kartick. The roof of the temple is made of special roofing grass commonly used in a village of terai and hills by the people in their dwelling hurts and houses.
 
 
According to me, through the visit to Chitlang a person can find out many different and new things. A person can know the socio-economic activities of the people living in Chitlang, life styles of people of Chitlang and other development activities going on in Chitlang.
Some of the farming people do to earn their living in Chitlang are briefly described below:

Olive Oil Farming:
                               Mr. Hartmut Bauder from Germany started this project in Chitlang since 1994, registering company as Himalayan Plantation Pvt Ltd. He has10 hectorin Chitlang in two places namely Tuscany and Vincy. He has approximately 2400 trees and yield around 80 kilos of Olive fruits each year.
  Goat Farming:
 
 
It’s a largest grazing land of Nepal. Government has goat farm project in this land. Previously there was sheep farming. It lies at a distance of 5 KM from the resort. With help of the firm Chitlang has taken initiation to make goat cheese.
 
 
Cheese Industry
 
 
 
                               Goat Cheese industry is run by goats milk. It is the most famous and important chesse factory in Nepal. These industry is most famous industry in Chitlang. This industry more over earns income of Chitlang. Most of Cheese is produced in this industry and then distributed all over the Nepal.



My Findings:


                              It was great experience to work on this kind of project to know about the beautiful place Called Chitlang of Nepal. It was really a great opportunity to know about Chitlang and its magnificent beautiful natural resources.  Chitlang is the one of the most exciting tourist destination as well as most refreshment places of Nepal. The place reflects the ancient culture and tradition of our ancestors. Similarly, lifestyle of people of Chitlang is very different and cultured .


At last I am very thankful to our sir, who gave me the opportunity to do project on the beautiful place named Chitlang .