ENSC 20032 - Computer Fundamentals and Programming
ENSC 20032 - Computer Fundamentals and Programming
ENSC 20032 - Computer Fundamentals and Programming
Overview
Today’s world is an information-rich world and it has become a necessity for everyone to know
about computers. Purpose of this tutorial is to introduce you about computer and its
fundamentals.
Module Objective
At the end of this module, the students are expected to:
1. Determine the basic concepts and different functions of a computer
2. Determine the different applications of computer in today’s industry.
Reading No. 1
Functionalities of a Computer
Definitions
Advantages
Storage Capability
Diligence
• Unlike human beings, a computer is free from monotony, tiredness and lack of
concentration.
• It can work continuously without any error and boredom.
• It can do repeated work with same speed and accuracy.
Versatility
Reliability
Automation
• Though the initial investment for installing a computer is high but it substantially
reduces the cost of each of its transaction.
Disadvantages
No I.Q
Dependency
Environment
No Feeling
Business
A computer has high speed of calculation, diligence, accuracy, reliability, or versatility which
made it an integrated part in all business organizations.
Banking
Insurance companies are keeping all records up-to-date with the help of computers. The
insurance companies, finance houses and stock broking firms are widely using computers
for their concerns.
Insurance companies are maintaining a database of all clients with information showing
• procedure to continue with policies
• starting date of the policies
• next due installment of a policy
• maturity date
• interests due
• survival benefits
• bonus
Education
• The computer provides a tool in the education system known as CBE (Computer Based
Education).
• CBE involves control, delivery, and evaluation of learning.
• The computer education is rapidly increasing the graph of number of computer students.
• There are number of methods in which educational institutions can use computer to
educate the students.
• It is used to prepare a database about performance of a student and analysis is carried
out on this basis.
Health Care
Computers have become important part in hospitals, labs, and dispensaries. The
computers are being used in hospitals to keep the record of patients and medicines. It is
also used in scanning and diagnosing different diseases. ECG, EEG, Ultrasounds and CT
Scans etc. are also done by computerized machines.
Some major fields of health care in which computers are used are:
• Diagnostic System - Computers are used to collect data and identify cause of illness.
• Lab-diagnostic System - All tests can be done and reports are prepared by computer.
• Patient Monitoring System - These are used to check patient's signs for
abnormality such as in Cardiac Arrest, ECG etc.
• Pharma Information System - Computer checks Drug-Labels, Expiry dates, harmful
drug’s side effects etc.
• Surgery: Nowadays, computers are also used in performing surgery.
One of major areas is CAD (Computer aided design) that provides creation and
modification of images. Some fields are:
• Structural Engineering - Requires stress and strain analysis for design of Ships,
Buildings, Budgets, Airplanes etc.
• Industrial Engineering - Computers deal with design, implementation and
improvement of integrated systems of people, materials and equipments.
• Architectural Engineering - Computers help in planning towns, designing
buildings, determining a range of buildings on a site using both 2D and 3D
drawings.
Military
Computers are largely used in defence. modern tanks, missiles, weapons etc. Military also
employs computerised control systems. Some military areas where a computer has been
used are:
• Missile Control
• Military Communication
• Military Operation and Planning
• Smart Weapons
• E-mail
• Chatting
• Usenet
• FTP
• Telnet
• Video-conferencing
Government
Computers play an important role in government. Some major fields in this category are:
• Budgets
• Sales tax department
• Income tax department
• Male/Female ratio
• Computerization of voter’s lists
• Computerization of driving licensing system
• Computerization of PAN card
• Weather forecasting
Overview
Generation in computer terminology is a change in technology a computer is/was being
used. Initially, the generation term was used to distinguish between varying hardware
technologies. But nowadays, generation includes both hardware and software, which together
make up an entire computer system.
Module Objective
At the end of this module, the students are expected to:
1. Differentiate the computers introduced in each generation and its main features and
functions.
Reading No. 1
Computer Generations
There are totally five computer generations known till date. Each generation has been
discussed in detail along with their time period and characteristics. Here approximate dates
against each generation have been mentioned which are normally accepted.
First Generation
The period of first generation was 1946-1959. The computers of first generation used
vacuum tubes as the basic components for memory and circuitry for CPU (Central Processing
Unit). These tubes, like electric bulbs, produced a lot of heat and were prone to frequent fusing
of the installations, therefore, were very expensive and could be afforded only by very large
organizations. In this generation mainly batch processing operating system were used. Punched
cards, paper tape, and magnetic tape were used as input and output devices. The computers in
this generation used machine code as programming language.
Second Generation
• Use of transistors
• Reliable in comparison to first generation
computers
• Smaller size as compared to first
generation computers
• Generated less heat as compared to first
generation computers
• Consumed less electricity as compared to
first generation computers
• Faster than first generation computers
• Still very costly
• A.C. needed
Supported machine and assembly languages Some computers of this generation were:
• IBM 1620
• IBM 7094
• CDC 1604
• CDC 3600
• UNIVAC 1108
The period of third generation was 1965-1971. The computers of third generation
used integrated circuits (IC's) in place of transistors. A single IC has many transistors,
resistors and capacitors along with the associated circuitry. The IC was invented by Jack
Kilby. This development made computers smaller in size, reliable and efficient. In this
generation remote processing, time-sharing, multi-programming operating system were
used. High-level languages (FORTRAN-II TO IV, COBOL, PASCAL PL/1, BASIC, ALGOL-
68 etc.) were used during this generation.
• IC used
• More reliable in comparison to previous
two generations
• Smaller size
• Generated less heat
• Faster
• Lesser maintenance
• Still costly
• A.C needed
• Consumed lesser electricity
• Supported high-level language
Fourth Generation
Fifth Generation
The period of fifth generation is 1980-till date. In the fifth generation, the VLSI
technology became ULSI (Ultra Large-Scale Integration) technology, resulting in the
production of microprocessor chips having ten million electronic components. This
generation is based on parallel processing hardware and AI (Artificial Intelligence)
software. AI is an emerging branch in computer science, which interprets means and
method of making computers think like human beings. All the high-level languages like C
and C++, Java, .Net etc. are used in this generation.
AI includes:
• Robotics
• Neural networks
• Game Playing
• Development of expert systems to make
decisions in real life situations.
• Natural language understanding and
generation.
The main features of fifth generation are:
• ULSI technology
• Development of true artificial intelligence
• Development of Natural language
processing
• Advancement in Parallel Processing
• Advancement in Superconductor
technology
• More user-friendly interfaces with multimedia features
Activity 1
Generations of Computer
Overview
Computers can be broadly classified by their speed, computing power and to the number
of users the computer can support.
Module Objective
At the end of this module, the students are expected to:
1. Contrast the different specifications of a computer based on their types.
Reading No. 1
Types of Computer
PC (Personal Computer)
Common operating systems for workstations are UNIX and Windows NT. Like PC,
Workstations are also single- user computers like PC but are typically linked together to
form a local-area network, although they can also be used as stand-alone systems.
Mainframe
Activity 1
Types of Computer
Module Objective
At the end of this module, the students are expected to:
1. Determine the five basic operations of a computer in converting raw data into
information
2. Contrast the common devices connected to the computer based the operations of
the computer.
Reading No. 1
Components
This unit contains devices with the help of which we enter data into computer. This
unit makes link between user and computer. The input devices translate the information
into the form understandable by computer.
CPU is considered as the brain of the computer. CPU performs all types of data
processing operations. It stores data, intermediate results and instructions(program).It
controls the operation of all parts of computer.
Output Unit
Output unit consists of devices with the help of which we get the information from
computer. This unit is a link between computer and users. Output devices translate the
computer's output into the form understandable by users.
This unit can store instructions, data and intermediate results. This unit supplies
information to the other units of the computer when needed. It is also known as internal
storage unit or main memory or primary storage or Random-access memory (RAM).
Its size affects speed, power and capability. Primary memory and secondary
memory are two types of memories in the computer. Functions of memory unit are:
• It stores all the data and the instructions required for processing.
• It stores intermediate results of processing.
• It stores final results of processing before these results are released to an output device.
• All inputs and outputs are transmitted through main memory.
Control Unit
This unit controls the operations of all parts of computer but does not carry out any
actual data processing operations.
• It is responsible for controlling the transfer of data and instructions among other units of
a computer.
• It manages and coordinates all the units of the computer.
• It obtains the instructions from the memory, interprets them, and directs the operation of
the computer.
• It communicates with Input/output devices for transfer of data or results from storage.
• It does not process or store data.
Logic Section
Input Devices
Following are few of the important input devices which are used in a computer:
• Keyboard
• Mouse
• Joy Stick
• Light pen
• Track Ball
• Scanner
• Graphic Tablet
• Microphone
• Magnetic Ink Card Reader (MICR)
• Optical Character Reader (OCR)
• Bar Code Reader
• Optical Mark Reader (OMR)
Activity 1
Components of a Computer
Module Objective
At the end of this module, the students are expected to:
1. Contrast the different types of computer memory, their classifications, functions and
uses.
2. Determine the uses and function of a motherboard.
Reading No. 1
Memory
The memory is divided into large number of small parts called cells. Each location or cell
has a unique address which varies from zero to memory size minus one. For example, if
computer has 64k words, then this memory unit has 64 * 1024=65536 memory locations. The
address of these locations varies from 0 to 65535. Memory is primarily of three types
• Cache Memory
• Primary Memory/Main Memory
• Secondary Memory
Cache Memory
Advantages
The advantages of cache memory are as follows
• Cache memory is faster than main
memory.
• It consumes less access time as compared
to main memory.
• It stores the program that can be executed
within a short period of time.
• It stores data for temporary use.
Disadvantages
The disadvantages of cache memory are
as follows
• Cache memory has limited capacity.
• It is very expensive
Primary memory holds only those data and instructions on which computer is
currently working. It has limited capacity and data is lost when power is switched off. It is
generally made up of semiconductor device. These memories are not as fast as registers.
The data and instruction required to be processed reside in main memory. It is divided into
two subcategories RAM and ROM.
Secondary Memory
RAM (Random Access Memory) is the internal memory of the CPU for storing data,
program and program result. It is read/write memory which stores data until the machine is
working. As soon as the machine is switched off, data is erased.
Access time in RAM is independent of the address that is, each storage location
inside the memory is as easy to reach as other locations and takes the same amount of
time. Data in the RAM can be accessed randomly but it is very expensive.
RAM is volatile, i.e. data stored in it is lost when we switch off the computer or if
there is a power failure. Hence a backup uninterruptible power system (UPS) is often used
with computers. RAM is small, both in terms of its physical size and in the amount of data
it can hold.
DRAM, unlike SRAM, must be continually refreshed in order to maintain the data.
This is done by placing the memory on a refresh circuit that rewrites the data several
hundred times per second. DRAM is used for most system memory because it is cheap
and small. All DRAMs are made up of memory cells which are composed of one capacitor
and one transistor.
ROM stands for Read Only Memory. The memory from which we can only read but
cannot write on it. This type of memory is non-volatile. The information is stored
permanently in such memories during manufacture. A ROM, stores such instructions that
are required to start a computer. This operation is referred to as bootstrap. ROM chips are
not only used in the computer but also in other electronic items like washing machine and
microwave oven.
The very first ROMs were hard-wired devices that contained a pre-programmed
set of data or instructions. This kind of ROMs are known as masked ROMs which are
inexpensive.
PROM is read-only memory that can be modified only once by a user. The user
buys a blank PROM and enters the desired contents using a PROM program. Inside the
PROM chip there are small fuses which are burnt open during programming. It can be
programmed only once and is not erasable.
Advantages of ROM
The advantages of ROM are as follows:
• Non-volatile in nature
• These cannot be accidentally changed
• Cheaper than RAMs
• Easy to test
• More reliable than RAMs
• These are static and do not require refreshing
• Its contents are always known and can be verified
The motherboard serves as a single platform to connect all of the parts of a computer
together. A motherboard connects CPU, memory, hard drives, optical drives, video card,
sound card, and other ports and expansion cards directly or via cables. It can be considered
as the backbone of a computer.
Features of Motherboard
Popular Manufacturers
• Intel
• ASUS
• AOpen
• ABIT
• Biostar
• Gigabyte
• MSI
The motherboard is mounted inside the case and is securely attached via small
screws through pre-drilled holes. Motherboard contains ports to connect all of the internal
components. It provides a single socket for CPU whereas for memory, normally one or
more slots are available. Motherboards provide ports to attach floppy drive, hard drive,
and optical drives via ribbon cables. Motherboard carries fans and a special port designed
for power supply.
There is a peripheral card slot in front of the motherboard using which video cards,
sound cards and other expansion cards can be connected to motherboard.
On the left side, motherboards carry a number of ports to connect monitor, printer,
mouse, keyboard, speaker, and network cables. Motherboards also provide USB ports
which allow compatible devices to be connected in plug- in/plug-out fashion for example,
pen drive, digital cameras etc.
Reading No. 3
Memory Unit
Activity 1
Computer Memory
In computer hardware, a port serves as an interface between the computer and other
computers or peripheral devices. In computer terms, a port generally refers to the part of a
computing device available for connection to peripherals such as input and output devices.
Module Objective
At the end of this module, the students are expected to:
1. Familiarize with the different ports a computer system has including their
characteristics and functions.
Reading No. 1
What is a Port?
A Port:
• is a physical docking point using which an external device can be connected to the
computer.
• can also be programmatic docking point through which information flows from a
program to computer or over the internet.
Characteristics
Serial Ports
Parallel Ports
PS/2 Port
• Used for old computer keyboard and mouse
• Also called mouse port
• Most of the old computers provide two PS/2 port, each for mouse and keyboard
• Also known as IEEE 1284-compliant Centronics port
VGA Port
• Connects monitor to a computer's video card.
• Has 15 holes.
• Similar to serial port connector but serial port connector has pins, it has holes.
Power Connector
• Three-pronged plug
• Connects to the computer's power cable that plugs into a power bar or wall socket
•
Firewire Port
• Transfers large amount of data at very fast speed.
• Connects camcorders and video equipment to the computer
• Data travels at 400 to 800 megabits per seconds
• Invented by Apple
• Three variants: 4-Pin FireWire 400 connector, 6-Pin FireWire 400 connector and 9-
Pin FireWire 800 connector
Modem Port
Game Port
• Connect a joystick to a PC
• Now replaced by USB.
• Connects Flat panel LCD monitor to the computer's high-end video graphic cards.
• Very popular among video card manufacturers.
Sockets
Activity 1
Computer Ports
When it comes to computers, the hardware is the physical and tangible part, like the
monitor, keyboard, and speakers. Software is the programs and operating systems that need to
be installed.
While a computer can’t run without hardware, it can run without software, but where’s
the fun in that? For instance, software needs hardware in order to operate how it is programmed
to. Your favorite video game or video conferencing platform are both examples of software that
needs computer hardware, like memory, processors, video cards, and sound devices, to work
how you want it to.
Module Objective
At the end of this module, the students are expected to:
1. Contrast the difference between a hardware and software and how they interact with
each other.
Reading No. 1
Hardware
Hardware represents the physical and tangible components of a computer i.e. the
components that can be seen and touched.
System Software
Application Software
• Payroll Software
• Student Record Software
• Inventory Management Software
• Income Tax Software
• Railways Reservation Software
• Microsoft Office Suite Software
• Microsoft Word
• Microsoft Excel
• Microsoft Powerpoint
Features of application software are as follows
• Close to use
• Easy to design
• More interactive
• Slow in speed
• Generally written in high-level language
• Easy to understand
• Easy to manipulate and use
• Bigger in size and requires large storage space
Activity 1
Hardware and Software
When we type some letters or words, the computer translates them in numbers as computers can
understand only numbers. A computer can understand positional number system where there
are only a few symbols called digits and these symbols represent different values depending on
the position they occupy in the number.
Module Objective
At the end of this module, the students are expected to:
1. Determine the types of number system the computer utilize.
2. Convert numerical values from one number system to another.
Reading No. 1
A value of each digit in a number can be determined using
• The digit
• The position of the digit in the number
• The base of the number system (where base is defined as the total number of
digits available in the number system).
The number system that we use in our day-to-day life is the decimal number
system. Decimal number system has base 10 as it uses 10 digits from 0 to 9. In decimal
number system, the successive positions to the left of the decimal point represent units,
tens, hundreds, thousands and so on.
Each position represents a specific power of the base (10). For example, the
decimal number 1234 consists of the digit 4 in the units’ position, 3 in the tens position, 2
in the hundreds position, and 1 in the thousands position, and its value can be written as
Example
Example
Example
Hexadecimal Number: 19FDE16 Calculating Decimal Equivalent:
Step Binary Number Decimal Number
Step 19FDE16 ((1 x 164) + (9 x 163) + (F x 162) + (D x 161) + (E x 160))10
1
Step 19FDE16 ((1 x 164) + (9 x 163) + (15 x 162) + (13 x 161) + (14 x 160))10
2
Step 19FDE16 (65536+ 36864 + 3840 + 208 + 14)10
3
Step 19FDE16 10646210
4
Note: 19FDE16 is normally written as 19FDE.
Reading No. 2
Number Conversion
There are many methods or techniques which can be used to convert numbers from one
base to another. We'll demonstrate here the following
Steps
• Step 1 - Divide the decimal number to be converted by the value of the new base.
• Step 2 - Get the remainder from Step 1 as the rightmost digit (least significant digit) of
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero
in Step 3. The last remainder thus obtained will be the most significant digit (MSD) of the new
base number.
Example
Decimal Number: 2910 Calculating Binary Equivalent:
Steps
• Step 1 - Determine the column (positional) value of each digit (this depends on the
position of the digit and the base of the number system).
• Step 2 - Multiply the obtained column values (in Step 1) by the digits in the
corresponding columns.
• Step 3 - Sum the products calculated in Step 2. The total is the equivalent value in
decimal.
Example
Binary Number: 111012 Calculating Decimal Equivalent:
Step Binary Number Decimal Number
Step 1 111012 ((1 x 24) + (1 x 23) + (1 x 22) + (0 x 21) + (1 x 20))10
Step 2 111012 (16 + 8 + 4 + 0 + 1)10
Step 3 111012 2910
Steps
Example
Octal Number: 258 Calculating Binary Equivalent:
Decimal Number: 2110 = Binary Number: 101012 Octal Number: 258 = Binary Number: 101012
Steps
• Step 1 - Divide the binary digits into groups of three (starting from the right).
• Step 2 - Convert each group of three binary digits to one octal digit.
Steps
• Step 1 - Convert each octal digit to a 3 digit binary number (the octal digits may be
treated as decimal for this conversion).
• Step 2 - Combine all the resulting binary groups (of 3 digits each) into a single binary
number.
Example
Steps
• Step 1 - Divide the binary digits into groups of four (starting from the right).
• Step 2 - Convert each group of four binary digits to one hexadecimal symbol.
Steps
Example
Hexadecimal Number: 1516 Calculating Binary Equivalent:
Step Hexadecimal Number Binary Number
Step 1 1516 110 510
Step 2 1516 00012 01012
Step 3 1516 000101012
Activity 1
Number System
Overview
Many believe that the terms “data” and “information” can be used interchangeably and
mean the same. However, there is a subtle difference between the two. Data can be a number,
symbol, character, word, and if not put into context, individual pieces of data mean nothing to
humans. On the other hand, information is a data put into context. Information is utilized by
humans in some significant way. A good example of information would be a computer. A
computer uses programming scripts, formulas, or software applications to turn data into
information.
Module Objective
At the end of this module, the students are expected to:
1. Differentiate data from information and understand the data processing cycle of a
computer.
2. Determine the components needed in computer networking.
Reading No. 1
What is Data?
Data is represented with the help of characters like alphabets (A-Z,a-z), digits (0-9) or
special characters(+,-,/,*,<,>,= etc.).
What is Information?
For the decision to be meaningful, the processed data must qualify for the following
characteristics
• Timely - Information should be available when required.
• Accuracy - Information should be accurate.
• Completeness - Information should be complete.
• Input - In this step the input data is prepared in some convenient form for
processing. The form will depend on the processing machine. For example, when
electronic computers are used, the input data could be recorded on any one of
several types of input medium, such as magnetic disks, tapes and so on.
• Processing - In this step input data is changed to produce data in a more useful
form. For example, pay- checks may be calculated from the time cards, or a
summary of sales for the month may be calculated from the sales orders.
• Output -Here the result of the proceeding processing step are collected. The
particular form of the output data depends on the use of the data. For example,
output data may be pay-checks for employees.
A computer network is a system in which multiple computers are connected to each other to
share information and resources.
Network Cables
Network cables are used to connect
computers. The most commonly used cable is
Category 5 cable RJ-45.
A computer can be connected to another one via a serial port but if we need to
connect many computers to produce a network, this serial connection will not work. The
solution is to use a central body to which other computers, printers, scanners etc. can be
connected and then this body will manage or distribute network traffic.
Router
A router is a type of device which acts as the central point among computers and
other devices that are part of a network. A router is equipped with holes called ports and
computers and other devices are connected to a router using network cables. Now-a-days
router comes in wireless modes using which computers can be connected without any
physical cable.
Network Card
Motherboard has a slot for internal network card where it is to be inserted. Internal
network cards are of two types in which first type uses Peripheral Component
Interconnect (PCI) connection while the second type uses Industry Standard Architecture
(ISA). Network cables are required to provide network access.
External network cards come in two flavours: Wireless and USB based. Wireless network
card needs to be inserted into the motherboard but no network cable is required to
connect to network.
USB card are easy to use and connect via USB port. Computers automatically detect
USB card and can install the drivers required to support the USB network card
automatically.
Overview
The computer's operating system (OS) manages all of the software and hardware on the
computer. Most of the time, there are several different computer programs running at the same
time, and they all need to access your computer's central processing unit (CPU), memory, and
storage. The operating system coordinates all of this to make sure each program gets what it
needs.
Module Objective
At the end of this module, the students are expected to:
1. Determine the features and objectives of an operating system installed in a
computer.
2. Determine the characteristics of an operating system.
3. Contrast the difference between internet and intranet.
Reading No. 1
Operating System
It is a program with following features:
• An operating system is a program that acts as an interface between the software
and the computer hardware.
• It is an integrated set of specialized programs that are used to manage overall
resources and operations of the computer.
• It is specialized software that controls and monitors the execution of all other
programs that reside in the computer, including application programs and other
system software.
Reading No. 2
Internet and Intranet
Internet
• PCs in intranet are not available to the world outside the intranet.
• Usually each company or organization has their own Intranet network and
members/employees of that company can access the computers in their intranet.
• Each computer in Intranet is also identified by an IP Address which is unique among
the computers in that Intranet.
• Internet is general to PCs all over the world whereas Intranet is specific to few PCs.
• Internet has wider access and provides a better access to websites to large
population whereas Intranet is restricted.
• Internet is not as safe as Intranet as Intranet can be safely privatized as per the need.
Activity 1
Operating System
Module Objective
At the end of this module, the students are expected to:
1. Demonstrate a basic understanding of computer hardware and software.
2. Demonstrate problem-solving skills.
3. Apply logical skills to programming in a variety of languages.
Reading No. 1
Turbo C
Turbo C was a software development tool for writing programs in the C language. As an
IDE, it included a source code editor, a fast compiler, a linker and an offline help file for
reference. Version 2 included a built-in debugger. Turbo C was a follow-up product to Borland's
Turbo Pascal, which had gained widespread use in educational institutions because the Pascal
language was suited for teaching programming to students. Although Turbo C was initially
developed by a different company, it shared a lot of features with Turbo Pascal, namely, the
look-and-feel of the interface and the various programming and debugging tools included.
However, it was not as successful as Turbo Pascal because of competition from other C
products such as Microsoft C, Watcom C, Lattice C, etc. Nevertheless, Turbo C still had the
advantage in compile speed and price.
Many of today’s operating systems, system drivers, browsers and games use C++ as their core
language, making it one of the most popular languages used.
This is a comprehensive guide that explores the reasons you should consider learning C++ and
the ways you can get started with C++.
1. Speed
Since, C++ is an extended version of C, the C part of it is very low level. This offers a
huge boost in speed that high-level languages like Python and Java cannot provide.
2. Statically typed
Since C++ is a statically typed programming language, it does not allow the compiler to
make assumptions about the type of data. For example, 10 is different from "10" and it must
be declared explicitly. Since these are determined at compile-time, it helps the compiler
catch errors and bugs before the execution of the program.
4. Object-oriented
C++ supports Object-Oriented programming, which provides a clear modular structure
for programs. With its use in C++, you are able to divide these complex problems into
smaller sets by creating objects.
9. Constant folding
This feature allowed the Turbo C compiler to evaluate constant expressions during
compile time rather than during run time.
Activity 1
Basic Computer Programming
Perform the following programming problems using C++. The output will be
a screenshot of the code used and the output.
1. Write a program in C++ to display the n terms of odd natural
number and their sum. (30 pts)
2. Write a program in C++ to display the first n terms of Fibonacci
Series. (20 pts)
3. Write a program in C++ to print a welcome text in a separate line.
(20 pts)