SlideShare a Scribd company logo
Introduction to
Computer
Programming
ENGR. EARL EDRENE G. DILLA, CCpE
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.
every time
•Validating user identification
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.
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
FirstExam
ple
/*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

Similar to introductiontocomputerprogramming.pptx (20)

PPTX
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
PPTX
Introduction to computers and programming languages
binoysatheesh
 
PPTX
Programming Fundamentals and Programming Languages Concepts
imtiazalijoono
 
PDF
C progrmming
Shivam Singhal
 
PDF
6272 cnote
P Kiran Sree
 
PPT
Synapseindia dot net development computer programming
Synapseindiappsdevelopment
 
PPTX
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
muhammadumairsoftwar
 
PPTX
Introduction to Computer, Programming languages , Networks and Internet.pptx
SheharBano86
 
PPTX
Computer fundamentals -types, os, languages etc.pptx
ssusere1071f2
 
PPTX
programming for problem solving-1 unit -1 ppt.pptx
prathima304
 
PPTX
02_Intro to Programming Language.pptx
JhunBrianAndam
 
PPTX
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
PPTX
Programming for Problem Solving
Sukhendra Singh
 
PPT
introduction computer programming languages
BakhatAli3
 
PPT
Topic 1 B C programming exercises one.ppt
Carlos701746
 
PPTX
1. Introduction to Computer System (1).pptx
AkshatMuke1
 
PDF
Introduction to Python and its basics.pdf
sumitt6_25730773
 
PPTX
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
ZainabNoor83
 
PPTX
01-PROGRAMMING introA of the class name. Pptx
simukondasankananji8
 
PPT
Book ppt
FALLEE31188
 
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
Introduction to computers and programming languages
binoysatheesh
 
Programming Fundamentals and Programming Languages Concepts
imtiazalijoono
 
C progrmming
Shivam Singhal
 
6272 cnote
P Kiran Sree
 
Synapseindia dot net development computer programming
Synapseindiappsdevelopment
 
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
muhammadumairsoftwar
 
Introduction to Computer, Programming languages , Networks and Internet.pptx
SheharBano86
 
Computer fundamentals -types, os, languages etc.pptx
ssusere1071f2
 
programming for problem solving-1 unit -1 ppt.pptx
prathima304
 
02_Intro to Programming Language.pptx
JhunBrianAndam
 
Define Computer language, Translator, Standard input out C
Dr Shailendra Bhalawe
 
Programming for Problem Solving
Sukhendra Singh
 
introduction computer programming languages
BakhatAli3
 
Topic 1 B C programming exercises one.ppt
Carlos701746
 
1. Introduction to Computer System (1).pptx
AkshatMuke1
 
Introduction to Python and its basics.pdf
sumitt6_25730773
 
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
ZainabNoor83
 
01-PROGRAMMING introA of the class name. Pptx
simukondasankananji8
 
Book ppt
FALLEE31188
 

Recently uploaded (20)

PDF
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PDF
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
PDF
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PPTX
Online Cab Booking and Management System.pptx
diptipaneri80
 
PDF
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
PDF
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
PDF
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
PPTX
Basics of Auto Computer Aided Drafting .pptx
Krunal Thanki
 
PDF
4 Tier Teamcenter Installation part1.pdf
VnyKumar1
 
PPTX
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
PPTX
filteration _ pre.pptx 11111110001.pptx
awasthivaibhav825
 
PDF
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
PPTX
Inventory management chapter in automation and robotics.
atisht0104
 
PPTX
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
PPTX
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PPTX
quantum computing transition from classical mechanics.pptx
gvlbcy
 
PPTX
Ground improvement techniques-DEWATERING
DivakarSai4
 
AI-Driven IoT-Enabled UAV Inspection Framework for Predictive Maintenance and...
ijcncjournal019
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Biodegradable Plastics: Innovations and Market Potential (www.kiu.ac.ug)
publication11
 
EVS+PRESENTATIONS EVS+PRESENTATIONS like
saiyedaqib429
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
Online Cab Booking and Management System.pptx
diptipaneri80
 
Packaging Tips for Stainless Steel Tubes and Pipes
heavymetalsandtubes
 
STUDY OF NOVEL CHANNEL MATERIALS USING III-V COMPOUNDS WITH VARIOUS GATE DIEL...
ijoejnl
 
20ME702-Mechatronics-UNIT-1,UNIT-2,UNIT-3,UNIT-4,UNIT-5, 2025-2026
Mohanumar S
 
Basics of Auto Computer Aided Drafting .pptx
Krunal Thanki
 
4 Tier Teamcenter Installation part1.pdf
VnyKumar1
 
Introduction to Fluid and Thermal Engineering
Avesahemad Husainy
 
filteration _ pre.pptx 11111110001.pptx
awasthivaibhav825
 
CAD-CAM U-1 Combined Notes_57761226_2025_04_22_14_40.pdf
shailendrapratap2002
 
Inventory management chapter in automation and robotics.
atisht0104
 
sunil mishra pptmmmmmmmmmmmmmmmmmmmmmmmmm
singhamit111
 
MT Chapter 1.pptx- Magnetic particle testing
ABCAnyBodyCanRelax
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
quantum computing transition from classical mechanics.pptx
gvlbcy
 
Ground improvement techniques-DEWATERING
DivakarSai4
 
Ad

introductiontocomputerprogramming.pptx

  • 1. Introduction to Computer Programming ENGR. EARL EDRENE G. DILLA, CCpE Instructor I
  • 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. every time •Validating user identification 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. 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. FirstExam ple /*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); }