army public school delhi cantt holiday home work...

18
ARMY PUBLIC SCHOOL DELHI CANTT HOLIDAY HOME WORK CLASS XI (2018-19) “If a child is to keep alive his inborn sense of wonder, he needs the companionship of at least one adult who can share it, rediscovering with him the joy, excitement and mystery of the world we live in.” - Rachel Carson.

Upload: others

Post on 03-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

ARMY PUBLIC SCHOOL

DELHI CANTT

HOLIDAY HOME WORK

CLASS – XI

(2018-19)

“If a child is to keep alive his inborn sense of wonder, he needs the companionship of at

least one adult who can share it, rediscovering with him the joy, excitement and mystery of

the world we live in.”

- Rachel Carson.

HOLIDAY HOME WORK FOR ENGLISH

Prepare a project file and compile the following:

1. Reading project

Read any of the following books by William Golding and write a Book- review:

a) Lord of the flies b) The Inheritors c) Rites of Passage d) The Spire e) Darkness Visible

The Review must include the following: A Cover page (with suitable illustration)

Table of Contents

About the author

And his body of work( one page)

Summary( one page)

List of major characters(3-4 lines about each)

Describe the characters you liked the most and mention why(one page)

2. Paste 10 newspaper reports on: Natural disasters Man-made disasters Social issues Environmental issues

3. Write a speech to be delivered in the school assembly on the topic: “ Need and value of Outdoor Games”.( 120-150 words)

4. You come across many advertisements in the local newspapers and find that these advertisements lure people into buying things they neither need nor can afford. Write an article for school magazine on the topic “ Should we buy things because they are advertised?” ( 120-150 words)

HOLIDAY HOME WORK FOR PHYSICS

Q1 Search link between technology & Physics for the following scientific principles :

(a) Laws of thermodynamics

(b) Controlled nuclear fission

( c) Digital logic

(d) Light amplification by stimulated emission of radiation

(e) Bernoullis principle in fluid dynamics

(f) Total internal reflection of light

(g) Trapping & controlling of atoms by laser beams & magnetic fields

Q2 Give the major contributions / discoveries by the following scientists :

(a) R.A Millikan

(b) Niel Bohr

( c) C.V Raman

(d) M.N Saha

(e) S.N Bose

(f) Enrico Fermi

(g) Edwin Hubble

(h) Hideki Yukawa

(i) S. Chandrasekhar

Q3 The sun,s angular diameter is measured to be 1920”. The distance D of sun from

earth is 1.496x1011m. What is the diameter of sun ?

Q4 Find the relative error in Z if Z= A4B1/3/ C D3/2

Q5 Convert 3ms-2 into kmh-2 by using suitable conversion of units .

Q6 Convert G= 6.67x10-11Nm2/kg2 into C.G.S system using method of dimensions

Q7 State the no. of significant figures in the following :

(1) 7.24x1011m

a) (2) 0.0702m

b) (3) 2.320 Kg

c) (4) 1.0152 dynes/ cm2

d) (5) 0.15690 Kgm-3

e) Q8 In a vernier calipers instrument if 5th div. of main scale coincides with 10th div. of

vernier scale, What would be the vernier constant of the instrument ?

f) Q9 The length breadth & thickness of rectangular sheet of metal are 4.126m,1.105m &

2.06 cm respectively Give the area & volume of sheet to correct no. of significant

figures.

g) Q10 A physical quantity P is related to four observables a,b,c,d as follows :

h) P = a2b3/cd1/2 . The % error in a,b,c & d are 2%, 1%, 3% &4% respectively. What is

the % error in quantity P

i) Q11 Check by method of dimns. the consistency of following physical equation :

j) K = MR2ω2 Where K is K.E of rotation, R is radius, ω is angular velocity,M is

mass

k) Q12 If ( P+a/v2) (V-b) = RT , determine the dimensions of a & b , where P stands for

pressure ,V for volume , v for velocity , R for gas constant & T for temp.

l) Q13 Freq. of vibration of stretched string depends on (1) length l of string (2) tension T

in string (3) mass per unit length M of string . Deduce formula for it using method of

dimension.

m) Q14 If each side of cube is measured to be 5.106 m , determine its total surface area

& volume to correct significant figures .

n) Q15 Resistance R =V/I , where V = (200+- 2) V & I = (5+- 0.1) A . find % error in R

o) Q16 We measure period of oscillations of simple pendulum . In successive

measurements the readings turn out to be 2.63 s , 2.56 s , 2.42s, 2.71s , &2.80 s .

Calculate the absolute error , relative error & % error .

p) Q17 A car is moving along a straight line say OP . It moves from O to P in 12 s &

returns from P to Q in 9 sec. What are average velocity & average speed of car in

going from (a) O to P

q) (b) from O to P & back to Q ?

r)

s) 0_____40____80_____120____160____200_____240______280_____320_____360_

__400

t) O Q P

+x(m)

Q18 The position of an object moving along x axis is given by :

X = a+ bt2 where a = 4m , b= 2ms-2 & t is measured in seconds . What is the velocity

of at t=0 sec. & t=1 sec. . what is the average vel. bet. t=2 s to t= 4 s.

Q19 A ball is dropped from a ht. of 90 m on a floor . At each collision with the floor ,

ball loses 1/10 of its speed . Plot speed time graph of its motion between t=0 to 12 s .

Q20 A man walks on a straight road from his home to market 2.5 km away with a

speed of 5km/h . Finding the market closed , he instantly turns & walks back with a

speed of 7.5km/h . What is the (a) mag. of average velocity (b) average speed of man

over the interval of time :

(1) 0-30 min. (2) 0-50 min. (3) 0-40 min.

Q21

Use Fig. below and geometry to find (a) the average velocity of the particle in time t and (b)

the time at which the velocity of the particle equals the average velocity.

Q22 A particle starts from rest and undergoes accelerations as

plotted in Fig. 3 below for the first three seconds. Plot a graph of (a)

velocity v as a function of time t and (b) position x as a function of

time t taking xo = 0. Find (c) the maximum velocity during the period

and (d) the distance moved by the particle in 3.0 s.

u)

HOLIDAY HOME WORK FOR CHEMISTRY

I Make notes on important points on “ Environmental chemistry “.

II Make a power point presentation on “Environmental chemistry”.

III Frame 1 , 2 and 3 marker questions (5 each type) on the following topics taught in the

class from NCERT :

(a) Molar Mass

(b) Mole concept

(c) Significant figures

(d) Empirical and molecular formulae

(e) Balancing of chemical equations

(f) Formation of compounds

(g) Familiarization with the periodic table

(h) Writing formulae of inorganic compounds.

IV Learn the main definitions, scientific terms, and make a chart on important formulae

from the chapter “some basic concepts of Chemistry”.

HOLIDAY HOME WORK FOR MATHS

1) Make a list of formulae of the chapter 3 2) revise ch 3 3) solve 50 extra questions based on ch 3 other than NCERT(questions enclosed) 4) make a ppt of the chapter alloted group wise

Solve the following questions in a separate notebook.

1) Find the value of sin(π + x) sin(π – x) cosec2x.

2) If cosx = - , find the value of cos2x.

3) Find the values of :

(i) 3sin sec – 4 sin cot

(ii) 2 sin2 ( + cosec2 cos2

4) If tanx = , find the value of

(i) Tan 2x (ii) sin 2x

5) Express each of the following into sum or differences:

i) 2 sin 5x cos 2x iii) 2 cos 5x sin 2x

ii) Cos 7x c0s 3x iv) sin 11x sin 4x

6) Express each of the following as a product:

i) Sin 11x + sin 5x

ii) Cos 7x + cos 4x

iii) Cos3x – cos 8x

iv) Sin9x – sin5x

7) Write the principle solution of the following.

i) Sinx =

ii) Tanx =

8) Write the general solution of the following.

i) Sinx =

ii) Cosx =

iii) Sinx = -

iv) tanx + 1 =0

9) If sin2x = cos3x , and 0 ≤ x <1 , then find the value of x.

10) Find the degree measure of the angle subtended at the Centre of a circle of

diameter 200cm by an arc of length 22cm.

11) Find the values of the following

i) Tan

ii) Sin (- )

iii) Cot (- )

iv) Cosec ( - )

12) If sinx = , cos y = - and x , y both lie in the second quadrant, find the value of

a) Sin (x+y) b) cos (x-y)

13) Show that

Sin α + sin ( α + ) + sin ( α + ) = 0

14) Find the value of

15) Evaluate : sin130 cos110 + sin110 cos130

16) Solve the following equations

i) Sin2x= -

ii) Tan3x = -1

iii) Cos3x= sin2x

iv) Sin3x + cos2x =0

17) If tan A = , tan B= , prove that A + B =

18) Prove that

Cosx –sinx = cos ( )

19) Solve: sin2x – sin4x + sin6x =0

20) Solve the equation

Tan 2x = tan

21) Prove that

Cos6 cos42 cos66 cos78 = 1/16

22) Find the value of tan (22 )

23) Prove that

Cos10x + cos8x + 3cos4x + 3cos2x= 8 cosx cos33x

24) If 5 sin = 3. Find the value of

25) Find minimum value of sec2 + cosec2

Write and learn all the formulae.

Prepare ch- sets

i) Sets and their reprentations

ii) Subsets of a set

iii) Operations on sets ( union and intersection of sets)

iv) Difference of sets and complement of a set

v) Practical problems on union and intersection of sets.

Each student of a group will prepare the topic and will discuss and teach the

other group members.

HOLIDAY HOME WORK FOR BIOLOGY

Q1.Why blue green algae included under monera not under plantae?

Q2. How euglenoids more advanced than blue green algaefrom evolutionary point of view ?

Q3. What do the statement contagium vivum fluidum signify?

Q4. At the sleeping time ,Rita’s mother went to kitchen and tookm small spoon of the curd

and added to the milk in the big bowl .Rita was amazed to see this and asked her mother for

the possible reason for the same.

1. What value did Rita reflect in her reasoning?

2. Why did Rita’s mother add curd to milk ?

3. Which bacteria is present in the curd ?

4. Name any harmful bacteria

Q5.Why all organisms have not been described and identified ?

Q6. The common name of rice is simpler than its technical name Oryza sativa.What then is

the advantage of a technical name?

Q7. Botanical garden are living herbaria. Comment.

Q8. Describe briefly the various means of recording description of species. How does it help

us?

Q9. Peter intented to visit Kew (England) with his friend. However , his friend discouragef

him with the plea that this is not a recreational point and he will get board there on . But ,

Petterb visited the same with some objective in mind .

1. With what objective Peter intented to visit Kew?

2. What value did Peter show ?

3. What educative background Peter might be possessing?

4. Which other spot should Petre visit for furtherance of his interest?

Q10 . Anuradha while throwing away staled out-datedv bread noticed green and black

patches on it> She took the stale bread in her college laboratory observed it under the

microscope.

1. What might have she observed under the microscope ?

2. Name the structure that Anuradha observed ?

3. What values are associated with her observations?

Q11. Why do mosses generally occur in regions which are moist?

Q12. In what respects ,Bryophyta is advanced over algae?

Q13. In what ways do the sporophytic and gametophytic generations of the ferns differ from

those of the bryophytes?

Q14. Define triple fusion .What is the product of this process? What does the product

develop into?

Q15. List the various factors that contributed for the successful distribution of flowering

plants all over the world.

Q16. Rakesh during his visit to village in the remote area, asked the flouriculturist how does

he transport cut flowers and plants safely in the city. He replied that he used one of the

aquatic moss for this purpose .Several thought came in the mind of Rakesh related to his

enquiry .These were

1. Which acquatic moss he was using?

2. How did this moss prevent the spoilage of the plants and flowers?

3. What values did Rakesh reflect in his observation?

Q17.Give three reasons why a snail and octopus are classified under the same phylum?

Q18.How important is the presence of air bladder in pisces?

Q19.What is the difference between progressive and retrogressive metamorphosis?

Q20. The group of students brought bat from the fields and carried it to their teacher .They

said to the teacher that this is a bird and explain its main features. The teacher told them

that this is not a bird but a mammal.

1. On what basis , the teacher said that bat is a mammal?

2. What is the scientific name of this animal?

3. What values are reflected in the observation of the students?

Q21. Justify “An apple is a false fruit” .

Q22. Sunflower appears as a single flower but it is not so in reality.Explain.

Q23. “Underground parts of a plant are not always roots”. Justify the statement.

Q24 . Anuradha while throwing away staled out-datedv bread noticed green and black

patches on it> She took the stale bread in her college laboratory observed it under the

microscope.

1. What might have she observed under the microscope ?

2. Name the structure that Anuradha observed ?

3. What values are associated with her observations?

Q25. Why do mosses generally occur in regions which are moist?

Q26. In what respects ,Bryophyta is advanced over algae?

Q27. In what ways do the sporophytic and gametophytic generations of the ferns differ from

those of the bryophytes?

Q28. Define triple fusion .What is the product of this process? What does the product

develop into?

HOLIDAY HOME WORK FOR IP

Create A New Table (Order Id, Customer Name, And Order Date) By Joining Two Tables

(Order Id, Customer Id, And Order Date) And (Customer Id, Customer Name, Contact Name,

Country).

Insert 10 Records In The Table

Write Different Data Types Used In Table.

Delete Record From Table.

Update Data In Table Using All Possible Methods

Use Select Command Using All The Conditions.

Perform Alter Command To Add Column , Remove Column And Modify Column.

HOLIDAY HOME WORK FOR PHYSICAL EDUCATION

Practical File Work

1. Practical No. 1: Draw a neat and labeled diagram of 400 meter Track & Field with

Computations.

2. Practical No. 2: Draw a labeled diagram of field & equipment of any one game of your

choice out of the below list. Mention the Indian history, rules & regulation, terminology

& skills, famous sports person‟s name of that game.

3. Practical No. 3: Explanation & list of 2017 National Awardees (Dronacharya Award,

Arjuna Award & Rajiv Gandhi Khel Ratan Award).

4. Revision of Unit- 1 and Unit- 2.

Note: Used only A4 sheets (Inter- Leaf sheets).

Badminton, Football and Volleyball (any one).

HOLIDAY HOME WORK FOR HOME SCIENCE

1. Make a table of career options in the various areas of Home Science .

2. Make a powerpoint presentation on Prevention from Preventable Diseases in

Childhood (polio , diphtheria , pertussis, tetanus , measles , chicken pox , mumps ,

cholera , diarrhoea )

3. Make a ppt on Managing Emergencies ie first aid for common emergencies .

4. Prepare notes of the following chapters –

Ch 1- Meaning and scope of Home Science.

Ch 2-Introduction to Various Stages of Life

Ch 3-Infancy (0-2years)

Ch 4-Early Childhood

Ch5-Childhood

Ch6-Protection from Preventable Diseases

5.Collect immunisation schedule cards for 0-5 years age group.

6. Prepare a ppt on “Food ,Nutrition ,Health and Fitness “

HOLIDAY HOME WORK FOR ACCOUNTANCY

Q1. Distinguish between book-keeping and accounting.

Q2. Explain various stages involved in Accounting process .

Q3. Discuss any five limitations of accounting.

Q4. „Accounting records financial transactions in terms of money.‟ Explain.

Q5. Discuss any five advantages of accounting.

Q6. Explain „reliability‟ and „understandability‟ as a characteristic of accounting

information.

Q7.Mr. Bean started business for buying and selling of readymade garments with Rs.

8,00,000

as initial investment. Out of this he paid Rs. 4,00,000 for the purchase of garments and

Rs.

50,000 for furniture and Rs. 50,000 for computers and remaining amount was deposited

into

the bank. He sold some of the ladies and kids garments for Rs. 3,00,000 for cash and

some

garments for 1,50,000 on credit to Mr Dean. Further, he brought men‟s garments of Rs.

2,00,000 from Mr Clean. Mr. Bean withdrew Rs. 20,000 from the business for his

domestic use.

From the above, answer the following:

(a) What is the amount of capital? (b)

What fixed assets did he buy?

(c ) What is the value of purchases?

(d) Who is the creditor and state the amount ?

(e) Who is the debtor and what is the amount receivable from him?

(f) What is the amount of drawings of Mr. Bean ?

Q8. State the accounting concept / convention involved in each of the

following situation:

1. The calibre or the quality of management team is not directly disclosed in the balance

sheet .

2. Advance received from a supplier is not taken as income or sale.

3. Assets are recorded in books at the cost incurred for acquisition of such assets.

4. Revenue must be recognized when it is realized and expenses are recognized when

incurred.

5. Revenue is generally recorded at the point of sale.

6. Capital contributed by the proprietor is credited to his capital account.

7. Financial statements of the firm are prepared every year on 31stMarch.

8. Goods sold on credit to Ramesh – Ramesh‟s account is debited and sales account is

credited.

9. Harpreet has entered into an agreeme.nt whereby he will earn Rs 10,00,000 for the

services

to be provided in the next year. The revenue should be recognized as the revenue in the

next

year after the service has been provided.

10. Purchase of pen is treated as an expense.

HOLIDAY HOME WORK FOR BUSINESS STUDIES

Q1MrRajnesh sold his furniture & bike on OLX as he was shifting base to London. Is this a

business activity ? Which element of busines is being referred to here ? (1)

Q2. NathuLal prepares „sonpapri‟ for customers during Diwali season every year. He prepared

more „Sonpapari‟ than he could sell this year. He employed women and children also and paid

them less salary manufacturing on the packages. This way he generated profit for himself.

(a) Do you think he is fulfilling all the objectives of business ?

(b) If not which aspects of this objective are not being fulfilled ?

(c) Write any two values lacking in NathuLal.

Q3. Write the name of form of business organisation found only in India.

Q4. Name two types of business in which sole proprietorship is very suitable. Q5. Name the

person who manages a Joint Hindu Family business.

Q6. Write the names of systems which govern membership in Joint Hindu Family business.

Q7. Enumerate the two conditions necessary for formation of Joint Hindu Family business.

Q.8 . Give an example of activity which is economic in one side and non economic on other

side.

Q9 Mohan, Sohan and Ramesh are brothers living in a village Mohan is a farmer. He grows

sugar cane in his field sohan is manufacturer of sugar who is doing the business with his

friends Rohan Singh and Jitender. Ramesh is a transporter. He sells the sugar in the city using

his truck. This year the sugar got spoiled due to heavy rain. Sohan his friends reduced the

wages of his workers to cut down their losses.

1. Classify the business activity undertaken by Mohan & Ramesh.

2. What form of business is Sohan doing with his friends.write any two features of this

form ?

3. Which value is violated by Sohan& his friends ?

Q11 Drkumar is an orthopedic surgeon in Jaipur Golden Hospital and DrMahajan, his friend is

a Pedetrician who has set his own clinic. DrMahajan‟s wife, Ms. Rajni operates her Jewellery

store. Compare & differentiate the nature of tasks undertaken by them

Q.12. Why is business considered an economic activity?

Q13. It a person sells his domestic computer at a profit, will it be considered a business? Also

explain the characteristic of business which is being stressed upon in the above said example.

Q14. Name the economic activity in which specialised knowledge is required.

Q1 5. Why is the insurance known as a teritary industry?

Q16. Write four differences among business, profession and employment.

Q17. “No business is risk free” in the light of this statement, explain the concept of business

risk and its any three causes.

Q18. Explain any four objectives of business

Q19. Define commerce, why is it of great importance in modern life?

Q.20 Distinguish between primary & secondary industry. Give examples.

Q.21 Define business. Explain the characteristics of business (any four)

Q.22 “Commerce is the sum total of activities that remove hindrances in the free flow of

goods from producers to consumers.” Explain.

Q.23 Explain any six factors that are important to be considered while starting a business.

Q.24 Write difference among industry, commerce and trade on any five basis.

Q.25 “Profit maxmisation can‟t be the sole objective of a business”. Explain.

Q26. In which type of secondary industry various raw materials are combined together

to make the final produ

Q27. A person sells his old car at a profit . Can it be termed as business Activity. ?

HOLIDAY HOME WORK FOR HINDI

ग्रीष्भकारीन अवकाश कामय ------ 1. "नभक का दायोगा" ऩाठ से वंशीधय का चरयत्र चचत्रण । 2.ऩ ंआरोऩीदीन के व्मक्तित्व के शुब व अशुब ऩक्ष । 3. जनसंचाय भाध्मभ की पाइर फनाना । 4. अभबव्मक्ति व्मक्तिगि जनसंचाय के सबी प्रश्न भरखना । 5. सभाचाय , खेर , व्माऩाय आदद की खफयें सचचत्र कद गं के साथ पाइर कयना ।

--------------------------------------------------------------------------------------------------

HOLIDAY HOME WORK FOR GEOGRAPHY

1. Prepare an Atlas based on maps given in Textbook II NCERT, „India physical environment‟

i) Administrative divisions of India

ii) Position of India in the world

iii) Physical divisions of India

iv) Major rivers of India

v) Annual average rainfall in India

vi) Major soil type

vii) Natural vegetation of India

viii) Biosphere reserves of India

ix) Earthquake hazard zones of India

x) Drought prone areas of India

2. Prepare a power point presentation on any one physiographic division of India of your

choice. It should include details of origin, location and other characteristics. Minimum 10

slides.

3. Prepare a comparative report on any one HIMALAYAN river and one PENINSULAR

river.

4. Prepare a project on the various theories regarding the origin of the earth with special

emphasis on the big bang theory.

HOLIDAY HOME WORK FOR HISTORY

1. Go to the CBSE site - cbse.nic.in ;check the topics for the project work ,collect

information on any topic for the project file.

2.Frame 20 questions of 2 marks, on the Theme Two-Writing and city life.

3.Read Themes 1&amp;2 and learn the questions and answers from Theme- 1

4.Visit The National Museum especially the section on the Harappan and write a report

on

it in about 5 pages and pastes photos of your visit on another 5 pages.

5. Watch at clippings\videos on any theme from the textbook and write a report on what

you have seen it in not more than 5 pages.

6.On the outline maps of the World, mark and name

a.The important places mentioned in Theme One- From the beginning of time

b. Theme Two-Writing and city life.mark and name the important Bronze Age

Civilisations,rivers Tigris and Euphrates, and important Mesopotamian sites.eg. Uruk,

Mari.

HOLIDAY HOME WORK FOR ECONOMICS

Draft a questionnaire on any one of the topics given below. You have to conduct survey on at least 50 families and analyse the data. • • 1 You are a District Education Officer who wants to assess the literacy levels and the reasons for dropping out of school children.

• • 2 Suppose you are a vigilance officer of an area and you receive complaints about overcharging of goods by traders i.e. charging a high price than the MRP. Visit a few shops and prepare a report on complaints.

• • 3 You are the chief health officer of a rural block. Identify the issues to be addressed through a project study. This may include health and sanitation problems in the area.

• • 4 You are a bank officer and want to survey the saving habits of the people by taking into consideration income and expenditure of the people. Prepare a report.

• • 5 Any other topic of your choice .

HOLIDAY HOME WORK FOR PSYCHOLOGY

Summer isupon us and it’s time to stay indoors, rest, drink lots of water, enjoy the seasonal

fruits and salads, catch up with family, complete class work / notes that you may have

missed and finally come back refreshed in July! Holiday assignments serve many purposes –

keeps you engaged, in touch with your work and gives you a chance to read, research and

expand your knowledge in all your subjects!

Research on the following topics:

1. What is the difference between mind and brain

2. Are all people the same? If no, what are the differences that you notice?

3. Describe the qualities and nature of the following people:

a. Any one friend of yours

b. A teacher you like

c. A teacher you are afraid of

d. Your mother

e. Your grandmother

f. Your brother or sister

4. Watch following movies

a. Sound of Music

b. A beautiful Mind

c. Taare Zameen Par

d. Gone with the wind

5. Complete your class work for Chapter 1

6. Read up Chapter 2 of your Psychology Textbook

HOLIDAY HOME WORK FOR PAINTING

1. Two still life with pencil shading size half cartridge sheet.

2. Two nature drawing , size half cartridge sheet(Flower drawing with pencil colours

and landscape with pencil colours).

HOLIDAY HOME WORK FOR COMPUTER SCIENCE

1 Point out the errors in the following program:

int main( )

{

cout<< “Enter variable” ;

cin>> var

sqrs = var * var

cout<< “The square is ” <<sqrs ;

2 Write the C++ program that inputs a student’s marks in three subjects (out of 100) and prints the percentage

marks.

3 What are data types? What are all predefined data types in C++?

4 Write definition for a class employee that can hold information like employee no, name, design, dept, basic

salary and have associated operations for printing payslips, modifying as employee’s details, printing an

employee’s work report.

5 Write short note on Static Binding.

6 Write the output of the following program:

a = 10

b = 20

b = b + a

print “a = “,a,”b=”,b

7 Basic IO

// File name: ~ftp/pub/class/cplusplus/HelloWorld/BasicIO.cpp

// Purpose: Converts gallons to liters

#include <iostream>

using namespace std;

int main()

{

float gallons, liters;

cout<< "Enter number of gallons: ";

cin>> gallons; // Read the inputs from the user

liters = gallons * 3.7854; // convert to liters

cout<< "Liters: " <<liters<<endl;

return 0;

}

8 One dimensional integer array

// Author: Herbert Schildt

// File name: ~ftp/pub/class/cpluslus/Array1.cpp

// Purpose: Read 10 integers into an array and then print

// them out

#include <iostream>

using namespace std;

int main()

{

int sample[10]; // this reserves 10 integer elements

int t;

// load the array

for(t = 0; t < 10; t++)

sample[t] = t;

// display the array

for(t = 0; t < 10; ++t)

cout<< sample[t] << ' ' ;

return 0;

}

9 The same program using function

//

// File name: ~ftp/pub/class/cplusplus/Functions/Absolute2.cpp

// Purpose: This program finds the absolute value of an integer

// using a function

//

int Abs(int i); // Function prototype

int main()

{

int number;

intabs_number;

cout<< "This program finds the absolute value of an integer." <<endl;

cout<< "Enter an integer (positive or negative): ";

cin>> number;

// Calling the function Abs()

abs_number = Abs(number);

cout<< "The absolute value of " << number << " is " <<abs_number;

cout<<endl;

return 0;

}

// Function definition

int Abs(int i)

{

if( i >= 0)

return i;

else

return -i;

}