PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
INTRODUCTION TO
PROGRAMMING
USING C#
PREPARED BY:
KRISHA A. PUBLICO
INSTRUCTOR
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
COMPUTER
PROGRAMMING
is a way of giving computers instructions about what they should do
next. These instructions are known as code, and computer
programmers write code to solve problems or perform a task.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
HISTORY OF C#
C# is a modern, general – purpose object oriented programming developed
by Microsoft and approved by Ecma and ISO.
C# is a simple, and typesafe programming language derived from C and C++. It
aims to combine the high productivity of visual basic and row power of C++
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
HISTORY OF C#
C# is designed by Anders Hejlsberg. C# is designed for Common Language
Infrastructure (CLI), which consists of the executable code and runtime
environment that allows use of various high – level languages to be used on
different computer platforms and architectures.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PRIMARY CHARACTERISTICS
OF C# LANGUAGE
Modern and Object Oriented
Simple and Flexible
Typesafety
Automatic Memory Management
Versioning Control
Cross Platform Interoperability
Advanced features introduced in C#2.0 and 3.0
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PROGRAMMING
PROCESS
TRANSFORMING COMPLEX PROBLEMS INTO ALGORITHMIC
SOLUTIONS.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
1. Problem Definition 2. Algorithm Design 3. Desktop Testing
Understand the problem BReak the problem EXecute the
before seeking solutions. into logical steps. Use algorithm manually.
Identify required inputs, an English outline Act as the computer
desired outputs, and (pseudocode) to map to find errors before a
processing steps. the sequence of tasks single line of code is
required. written.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
4. Coding 5. Testing & Debugging 6. Documentation
TRAnslate the verified ENTER Test data and CReate user manuals
algorithm into a computer execute the program. and internal notes.
language that the Identify, isolate, and fix Essential for program
hardware can understand errors until the output is maintenance and
and execute. correct. future upgrades.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PROGRAM LOGIC FORMULATION
LOGICAL REASONING
the use of logical thinking in order to find results or
draw conclusions
ALGORITHM
is a logical sequence of steps for solving a problem
that can be translated into a computer program.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
2 WAYS OF IMPLEMENTING
AN ALGORITHM
A pseudocode is an artificial and informal language
that helps programmers develop algorithms. It is
usually a combination of English words and some
keywords of a programming language.
A flowchart is a diagram that represents the
sequence of operations in a process. It is a graphic
representation of an algorithm.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
FLOWCHARTING SYMBOLS
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
NOTATIONS COMMONLY USED IN
FLOWCHARTING
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
VARIABLE
is a storage location capable of containing a certain type of data that can be
modified during program execution.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
Rules of Drawing Flowcharts
for Algorithms
1. All boxes of flowcharts are connected with arrows to show the logical connection
between them.
[Link] will flow from top to bottom
[Link] flowcharts start with a Start Box and end with a Terminal Box.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
EXAMPLES OF FLOWCHARTS FOR ALGORITHMS
1. Calculate the Interest of a Bank Deposit
Algorithm:
• Step 1: Read amount,
• Step 2: Read years,
• Step 3: Read rate,
• Step 4: Calculate the interest with
formula
"Interest=Amount*Years*Rate/100
• Step 5: Print interest,
- [Link]
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
EXAMPLES OF FLOWCHARTS FOR ALGORITHMS
1. Determine and Output Whether
Number N is Even or Odd
Algorithm:
Step 1: Read number N,
Step 2: Set remainder as N
modulo 2,
Step 3: If remainder is equal to
0 then number N is even, else
number N is odd,
Step 4: Print output.
- [Link]
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
EXAMPLES OF FLOWCHARTS FOR ALGORITHMS
1. Determine Whether a Temperature is
Below or Above the Freezing Point
Algorithm:
• Step 1: Input temperature,
• Step 2: If it is less than 32,
then print "below freezing
point", otherwise print
"above freezing point"
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
EXAMPLES OF FLOWCHARTS FOR ALGORITHMS
1. Determine Whether A Student
Passed the Exam or Not
Algorithm:
• Step 1: Input grades of 4
courses M1, M2, M3 and M4,
• Step 2: Calculate the average
grade with formula
"Grade=(M1+M2+M3+M4)/4"
• Step 3: If the average grade is
less than 60, print "FAIL", else
print "PASS".
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
GROUP ACTIVITY
FlowQuest:Build the
Algorithm
Every step leads to the solution
HELLO@[Link] - [Link]
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
[Link]
Exercises • Start
[Link] • Input two numbers
• Start • Add them
• Input a number • Display result
• Check if the number is divisible by 2 • End
If remainder = 0 → Display "Even Number"
• Else → Display "Odd Number" [Link]
• End • Start
• Input three numbers
[Link]
• Compute average
• Start
• Display result
• Input two numbers
• End
• Compare numbers
• Display larger number 5. Draw a flowchart that will compute and display
• End the area of a rectangle using the formula : Area =
length x width.
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
ASSIGNMENT
1. Draw a flowchart that will compute and display the area of a rectangle
using the formula : Area = length x width.
[Link] a flowchart that will compute for the prelim grade of a student.
Consider the following factors wherein quizzes is 30 %, class standing is 30%
and major exam is 40. Display the prelim grade.
[Link] a flowchart that will convert and display inputted number in
inches (in) to its equivalent number in feet (ft).
PROGRAMMING
PRESENTATION HOME ABOUT CONTENT OTHERS
THANK YOU
HELLO@[Link] - [Link]