SlideShare a Scribd company logo
2
Most read
3
Most read
4
Most read
Introduction to
Computer
Programming
Lanie P. Plecerda
Instructor I
Computer program
- is a list of instructions that the computer
machine follows to properly accept input,
correctly process them and present the results
in the most understandable way.
Computer Programming
– is considered to be an art and at the same time a science. It is an art because
there is no standard way to interpret a problem and solve it using a standard form of
programming procedures and styles. It is fast becoming a science because standard
programming practice is starting to be adopted.
Programs fall into two major classes:
application programs and operating
systems. An application program is
one that carries out some function directly
for a user, such as word processing or
game-playing. An operating system is a
program that manages the computer and
the various resources and devices
connected to it, such as RAM (random
access memory), hard drives, monitors,
keyboards, printers, and modems, so that
they may be used by other programs.
A programmer uses another type of program
called a text editor to write the new program
in a special notation called a programming
language. With the text editor, the
programmer creates a text file, which is an
ordered list of instructions, also called the
program source file. The individual instructions
that make up the program source file are
called source code. At this point, a special
applications program translates the
source code into machine language, or
object code — a format that the operating
system will recognize as a proper program and
be able to execute.
Three types of applications programs
translate from source code to object
code: compilers, interpreters, and
assemblers. The three operate differently
and on different types of programming
languages, but they serve the same
purpose of translating from a
programming language into machine
language. A compiler translates text
files written in a high-level programming
language—such as Fortran, C, or Pascal—
from the source code to the object code
all at once
Computer is composed of:
1. CPU (Central Processing Unit) –
this is where all mathematical and logical
forms of processing are done on data.
2. Memory – before a computer can do
any productive work such as
programming, it has to remember things
such as data it needs to produce
information.
3. Input and Output Device – data
have to come into the computer by first
entering them through input devices.
Ex. Keyboard. After the computer
executes a program to process data
and produce information, this
information remains in the memory.
Part of the program has to show these
results to the outside world. Output
devices such as monitor screen and
printers are used to display the results
to the user.
4. Software – computers today come
bundled with some software already
installed in them.
Operating System – performs for the
programmer many tasks that used to
be very difficult to program
Two forms of Memory
• Internal memory (RAM-Random
Access Memory) – stores programs and
data that are executed and processed by
the computer.
• Secondary memory – supplements RAM
so those computers are able to
permanently save programs and data that
are not yet needed for execution and
processing. Ex. Floppy disk, hard disk &
etc.
The following are standard Operating
System functions.
•Validating user identification
every time the user uses the
computer
•Provides standard functions like
editor, compilers and linkers
•Manages files of the user by
providing functions like Copy,
Delete, Append
The following are standard Operating
System functions.
•Retrieves data out of data files
•Manages memory for the user by
determining where in the memory a
program is to be loaded every time it is
called to run
•Makes communication between the CPU,
Memory and input/output devices
transparent to the user or the user are
unaware of these things while they are at
work.
High level languages
– are programming languages that
are closer to human language than
to machine language. They are
characterized to use common
English words as their instructions.
Aside from that, high level
languages have the following
characteristics:
High level languages
• Requires additional step of compilation or
translation so that from high-level, another
program that has exactly the same meaning
and intended results in low-level or machine
language can be generated and loaded into
the computer and executed.
• A compiled program is usually not as
efficient as when the program was originally
written in machine language or assembly.
This is due to the fact that compilers add a
lot of extra overheads in terms of memory
and non-optimized logical translations.
Each of these programming languages
was designed to solve particular kinds
of problems.
• COBOL – Common Business Oriented Language was
designed to solve business problems like accounting.
• FORTRAN – Formula Translation is a high level
language used for scientific and engineering
applications.
• Pascal and C – are general-purpose language. They
are high-level language but they can be embedded
with assembly language code effectively making these
languages middle-level languages. C language is
responsible in the implementation f major software
including operating systems, compilers and software
development tools.
The Simplest computer
programs perform three basic
operations:
• get the input from the keyboard
• process the input data
• display the results on the screen
INPUT DATA
PROCESS DATA
DISPLAY ALL RESULTS
The most basic form of a C program
follows a very simple format:
pre-processor
directives
main function
{
declarations
statements
}
First Example
/*Converts weight in pounds to kilograms*/
#include <stdio.h>
#define kg_in_pound .454
int main()
{float pounds, kilograms; /*declare both weights as float data type*/
printf(“Enter weight in pounds :”)
scanf(“%f”,&pounds);
kilograms = kg_in_pound * pounds;
printf(“5.2f Pounds is equal %.2f kilograms,n”, pounds, kilograms);
getch();
return(0);
}
- END -

More Related Content

PPTX
Introduction to programming
PDF
Computer Programming
PPT
Computer programming concepts
PPTX
Computer Programming
PPTX
Computer programming
PPTX
Programming Fundamentals
PPTX
Basic programming concepts
PPTX
Computer programming
Introduction to programming
Computer Programming
Computer programming concepts
Computer Programming
Computer programming
Programming Fundamentals
Basic programming concepts
Computer programming

What's hot (20)

PPT
High level and Low level Language
PPT
Lect 1. introduction to programming languages
PPT
Intro To Programming Concepts
PPT
System software and Application software
PPT
Computer Programming - Lecture 1
PPT
Programming languages
PPTX
Types of application software
PPT
Visual basic
PPT
Chapter 1 - An Introduction to Programming
PPT
Programming
PPT
Program logic and design
PPTX
Computer languages
PPTX
Binary number system
PPT
Logic Formulation 1
PPT
Computer languages
PDF
3. basic organization of a computer
PPTX
Programming Fundamentals lecture 1
PPTX
Introduction to computer Powerpoint Presentation
PPTX
pseudocode and Flowchart
PPTX
Types of system software
High level and Low level Language
Lect 1. introduction to programming languages
Intro To Programming Concepts
System software and Application software
Computer Programming - Lecture 1
Programming languages
Types of application software
Visual basic
Chapter 1 - An Introduction to Programming
Programming
Program logic and design
Computer languages
Binary number system
Logic Formulation 1
Computer languages
3. basic organization of a computer
Programming Fundamentals lecture 1
Introduction to computer Powerpoint Presentation
pseudocode and Flowchart
Types of system software
Ad

Viewers also liked (8)

PPTX
The world's top mobile social games companies
PPTX
Consumers rights
PPTX
Programmer ppt
PPTX
Computer programmer
ODP
Computer programmer job information
PPTX
Customer Complaint Management
PPT
Consumer protection
PPTX
Consumer rights
The world's top mobile social games companies
Consumers rights
Programmer ppt
Computer programmer
Computer programmer job information
Customer Complaint Management
Consumer protection
Consumer rights
Ad

Similar to Introduction to computer programming (20)

PPTX
introductiontocomputerprogramming-140713205433-phpapp02.pptx
PPTX
introductiontocomputerprogramming.pptx
PPTX
Program Logic and Design
PPTX
Computer and programing basics.pptx
PDF
Introduction To Programming In C Language C Programming Best C Programming La...
PPTX
Introduction to Computer, Programming languages , Networks and Internet.pptx
PPTX
lecture Slides - Week 1.programming fundamentals
PPTX
Lecture-1-Introduction-Sep02-2018 (1).pptx
PPTX
Introduction to computers and programming languages
PPTX
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
PDF
C progrmming
PDF
6272 cnote
PPTX
Csc240 lecture 1
PPTX
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
PDF
C with lab
PPTX
2_Basic concepts about computer Hardware _ Software.pptx
PPTX
2_Basic concepts about computer Hardware _ Software.pptx
PPTX
2_Basic concepts about computer Hardware _ Software.pptx
PPTX
2_Basic concepts about computer Hardware _ Software.pptx
PPTX
programming for problem solving-1 unit -1 ppt.pptx
introductiontocomputerprogramming-140713205433-phpapp02.pptx
introductiontocomputerprogramming.pptx
Program Logic and Design
Computer and programing basics.pptx
Introduction To Programming In C Language C Programming Best C Programming La...
Introduction to Computer, Programming languages , Networks and Internet.pptx
lecture Slides - Week 1.programming fundamentals
Lecture-1-Introduction-Sep02-2018 (1).pptx
Introduction to computers and programming languages
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
C progrmming
6272 cnote
Csc240 lecture 1
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
C with lab
2_Basic concepts about computer Hardware _ Software.pptx
2_Basic concepts about computer Hardware _ Software.pptx
2_Basic concepts about computer Hardware _ Software.pptx
2_Basic concepts about computer Hardware _ Software.pptx
programming for problem solving-1 unit -1 ppt.pptx

Recently uploaded (20)

PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Spectroscopy.pptx food analysis technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Approach and Philosophy of On baking technology
Dropbox Q2 2025 Financial Results & Investor Presentation
sap open course for s4hana steps from ECC to s4
Network Security Unit 5.pdf for BCA BBA.
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Spectroscopy.pptx food analysis technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Diabetes mellitus diagnosis method based random forest with bat algorithm
cuic standard and advanced reporting.pdf
NewMind AI Weekly Chronicles - August'25 Week I
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Approach and Philosophy of On baking technology

Introduction to computer programming

  • 2. Computer program - is a list of instructions that the computer machine follows to properly accept input, correctly process them and present the results in the most understandable way. Computer Programming – is considered to be an art and at the same time a science. It is an art because there is no standard way to interpret a problem and solve it using a standard form of programming procedures and styles. It is fast becoming a science because standard programming practice is starting to be adopted.
  • 3. Programs fall into two major classes: application programs and operating systems. An application program is one that carries out some function directly for a user, such as word processing or game-playing. An operating system is a program that manages the computer and the various resources and devices connected to it, such as RAM (random access memory), hard drives, monitors, keyboards, printers, and modems, so that they may be used by other programs.
  • 4. A programmer uses another type of program called a text editor to write the new program in a special notation called a programming language. With the text editor, the programmer creates a text file, which is an ordered list of instructions, also called the program source file. The individual instructions that make up the program source file are called source code. At this point, a special applications program translates the source code into machine language, or object code — a format that the operating system will recognize as a proper program and be able to execute.
  • 5. Three types of applications programs translate from source code to object code: compilers, interpreters, and assemblers. The three operate differently and on different types of programming languages, but they serve the same purpose of translating from a programming language into machine language. A compiler translates text files written in a high-level programming language—such as Fortran, C, or Pascal— from the source code to the object code all at once
  • 6. Computer is composed of: 1. CPU (Central Processing Unit) – this is where all mathematical and logical forms of processing are done on data. 2. Memory – before a computer can do any productive work such as programming, it has to remember things such as data it needs to produce information.
  • 7. 3. Input and Output Device – data have to come into the computer by first entering them through input devices. Ex. Keyboard. After the computer executes a program to process data and produce information, this information remains in the memory. Part of the program has to show these results to the outside world. Output devices such as monitor screen and printers are used to display the results to the user.
  • 8. 4. Software – computers today come bundled with some software already installed in them. Operating System – performs for the programmer many tasks that used to be very difficult to program
  • 9. Two forms of Memory • Internal memory (RAM-Random Access Memory) – stores programs and data that are executed and processed by the computer. • Secondary memory – supplements RAM so those computers are able to permanently save programs and data that are not yet needed for execution and processing. Ex. Floppy disk, hard disk & etc.
  • 10. The following are standard Operating System functions. •Validating user identification every time the user uses the computer •Provides standard functions like editor, compilers and linkers •Manages files of the user by providing functions like Copy, Delete, Append
  • 11. The following are standard Operating System functions. •Retrieves data out of data files •Manages memory for the user by determining where in the memory a program is to be loaded every time it is called to run •Makes communication between the CPU, Memory and input/output devices transparent to the user or the user are unaware of these things while they are at work.
  • 12. High level languages – are programming languages that are closer to human language than to machine language. They are characterized to use common English words as their instructions. Aside from that, high level languages have the following characteristics:
  • 13. High level languages • Requires additional step of compilation or translation so that from high-level, another program that has exactly the same meaning and intended results in low-level or machine language can be generated and loaded into the computer and executed. • A compiled program is usually not as efficient as when the program was originally written in machine language or assembly. This is due to the fact that compilers add a lot of extra overheads in terms of memory and non-optimized logical translations.
  • 14. Each of these programming languages was designed to solve particular kinds of problems. • COBOL – Common Business Oriented Language was designed to solve business problems like accounting. • FORTRAN – Formula Translation is a high level language used for scientific and engineering applications. • Pascal and C – are general-purpose language. They are high-level language but they can be embedded with assembly language code effectively making these languages middle-level languages. C language is responsible in the implementation f major software including operating systems, compilers and software development tools.
  • 15. The Simplest computer programs perform three basic operations: • get the input from the keyboard • process the input data • display the results on the screen INPUT DATA PROCESS DATA DISPLAY ALL RESULTS
  • 16. The most basic form of a C program follows a very simple format: pre-processor directives main function { declarations statements }
  • 17. First Example /*Converts weight in pounds to kilograms*/ #include <stdio.h> #define kg_in_pound .454 int main() {float pounds, kilograms; /*declare both weights as float data type*/ printf(“Enter weight in pounds :”) scanf(“%f”,&pounds); kilograms = kg_in_pound * pounds; printf(“5.2f Pounds is equal %.2f kilograms,n”, pounds, kilograms); getch(); return(0); }