بسم اهلل الرمحن الرحيم

Similar documents
Fundamentals of Programming. Lecture 6: Structured Development (part one)

BIL101E: Introduction to Computers and Information systems Lecture 8

An Introduction to Programming with C++ Sixth Edition. Chapter 2 Beginning the Problem-Solving Process

Introduction to Programming

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

Chapter 1 INTRODUCTION TO COMPUTER AND PROGRAMMING

FLOW CHART AND PSEUDO CODE

Computer System and programming in C

Pseudo Code and Flow Charts. Chapter 1 Lesson 2

CS111: PROGRAMMING LANGUAGE1. Lecture 2: Algorithmic Problem Solving

Chapter 3 Structured Program Development

Week 1 Introduction to Programming

بسم اهلل الرمحن الرحيم

CS 199 Computer Programming. Spring 2018 Lecture 2 Problem Solving

Structured Program Development in C

Introduction to Computers

Chapter 1: Problem Solving Skills Introduction to Programming GENG 200

FUNDAMENTALS OF COMPUTING & COMPUTER PROGRAMMING UNIT III. 2 Marks PROBLEM SOLVING AND OFFICE AUTOMATION

Structured Program Development

UNIT-3 PROBLEM SOLVING AND OFFICE AUTOMATION

Algorithms Flowcharts And Pseudocode An Algorithm Baking

PROGRAM DESIGN TOOLS. Algorithms, Flow Charts, Pseudo codes and Decision Tables. Designed by Parul Khurana, LIECA.

Computers Programming Course 6. Iulian Năstac

Method & Tools for Program Analysis & Design

Software Development. Designing Software

Outline. Program development cycle. Algorithms development and representation. Examples.

Chapter 2 - Control Structures

Chapter 1: An Overview of Computers and Logic

ALGORITHMS AND FLOWCHARTS

SKILL AREA 306: DEVELOP AND IMPLEMENT COMPUTER PROGRAMS

Unit II. (i) Computer Programming Languages

1. The first step that programmers follow when they solve problems is to plan the algorithm.

CHAPTER 2 PROBLEM SOLVING TECHNIQUES. Mr Mohd Hatta Bin Hj Mohamed Ali Computer Programming BFC2042

Microsoft Visual Basic 2015: Reloaded

Introduction Objectives: 1) differentiate between high-level, low-level, and machine language; 2) explain why it is necessary to translate a program

C++ Programming Language Lecture 2 Problem Analysis and Solution Representation

Microsoft Visio 2010: An Introduction

Algorithms (continued)

Fundamental of Programming (C)

Fundamentals of Programming

ITEC102 INFORMATION TECHNOLOGIES

A Constant Rate of Change Name Part 1

depicts pictorially schematic representation of an algorithm document algorithms. used in designing or documenting

STUDENT OUTLINE. Lesson 8: Structured Programming, Control Structures, if-else Statements, Pseudocode

IS 0020 Program Design and Software Tools

Microsoft Visual Basic 2005: Reloaded

PROBLEM SOLVING AND OFFICE AUTOMATION. A Program consists of a series of instruction that a computer processes to perform the required operation.

Computer is an electronic machine that can receive, store, transform and output data of all kinds (image, text, numeric, graphics and sound).

PSEUDOCODE AND FLOWCHARTS. Introduction to Programming

Slide 1. Slide 2. Slide 3. General Problem-Solving. Find the Weight of the Block. General_Problem_Solving_slides.docx 9/7/07 MET 107

Class 8 ALGORITHMS AND FLOWCHARTS. The City School

Algorithms: The recipe for computation

Shell Education #50672 Interactive Whiteboard Activities: Mathematics 1

PROBLEM SOLVING AND PYTHON PROGRAMMING

Word 2003: Flowcharts Learning guide

SME1013 PROGRAMMING FOR ENGINEERS

Visual Basic Course Pack

Chapter Two: Program Design Process and Logic

The Further Mathematics Support Programme

FLOWCHARTS A flowchart is a graphical representation of the steps to be followed for solving problem. It consists of a set of symbols.

Problem Solving FLOWCHART. by Noor Azida Binti Sahabudin Faculty of Computer Systems & Software Engineering

Introduction to Computers and Java

Problem Solving Footer Text 10/30/2015 1

SOEE1160: Computers and Programming in Geosciences Semester /08. Dr. Sebastian Rost

Algorithms and Flowcharts

Introduction to Flowcharting

JavaScript: Control Statements I

Drawing Tools. Drawing a Rectangle

Vision Pointer Tools

PROBLEM SOLVING TECHNIQUES

IDENTIFY WAYS OF REPRESENTING ALGORITHMS.

Java How to Program, 9/e. Copyright by Pearson Education, Inc. All Rights Reserved.

A flow chart is a graphical or symbolic representation of a process.

An Introduction to Programming with C++ Sixth Edition. Chapter 7 The Repetition Structure

Chapter 1 Introduction to Computers

JavaScript: Control Statements I Pearson Education, Inc. All rights reserved.

The sequence of steps to be performed in order to solve a problem by the computer is known as an algorithm.

Programming Language 2 (PL2)

Chapter 2 - Problem Solving

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Lesson 1. Introduction to Programming OBJECTIVES

Tutorial No. 2 - Solution (Overview of C)

First Visual Basic Lab Paycheck-V1.0

CS/IT 114 Introduction to Java, Part 1 FALL 2016 CLASS 8: SEP. 29TH INSTRUCTOR: JIAYIN WANG

class Shape { // Color of the shape. (Recall that class Color // is defined in package java.awt. Assume // that this class has been imported.

LAB 2 INTRODUCTION TO PROGRAMMING

1. The narratives, diagrams, charts, and other written materials that explain how a system works are collectively called

Flow Chart & Algorithms

NAME DATE PERIOD. Areas of Parallelograms and Triangles. Review Vocabulary Define parallelogram in your own words. (Lesson 6-2)

ER Modeling Data Modeling and the Entity-Relationship (ER) Diagram Pg 1

Computer Programming-1 CSC 111. Chapter 1 : Introduction

CHAPTER 1: PROGRAM DEVELOPMENT LIFE CYCLE. Prepared for: CSC 128 Fundamentals of Computer Problem Solving

Algorithms and Problem Solving

Fundamentals of Programming Session 12

Create a Flowchart in PowerPoint

Week 1 Introduction to Computer and Algorithm (Part1) UniMAP Sem II 11/12 DKT121: Basic Computer Programming 1

Python Unit

Session 2b: structured specifications Purpose and criteria Structured specification components Introduction to dataflow diagrams

Chapter 2 Input, Processing and Output. Hong Sun COSC 1436 Spring 2017 Jan 30, 2017

UML Component Diagrams A.Y 2018/2019

Transcription:

بسم اهلل الرمحن الرحيم Fundamentals of Programming C Session # 3 By: Saeed Haratian Spring 2016

Outlines Equality and Relational Operators A Simple C Program: Relations Keywords Algorithm Flow Chart Pseudo Code

Equality and Relational Operators

Equality and Relational Operators

Equality and Relational Operators

Equality and Relational Operators

A Simple C Program: Relations

A Simple C Program: Relations

A Simple C Program: Relations

A Simple C Program: Relations

A Simple C Program: Relations

Keywords

Algorithm Before writing a program to solve a particular problem, it s essential to have a thorough understanding of the problem and a carefully planned approach to solving the problem. The solution to any computing problem involves executing a series of actions in a specific order.

Algorithm A procedure for solving a problem in terms of the actions to be executed, and the order in which these actions are to be executed is called an algorithm. Correctly specifying the order in which the actions are to be executed is important. Specifying the order in which statements are to be executed in a computer program is called program control.

Flow Chart A flowchart is a graphical representation of an algorithm or of a portion of an algorithm. Flowcharts are drawn using certain special-purpose symbols such as rectangles, diamonds, ovals, and small circles; these symbols are connected by arrows called flowlines. Like pseudocode, flowcharts are useful for developing and representing algorithms, although pseudocode is preferred by most programmers.

Flow Chart We use the rectangle symbol, also called the action symbol, to indicate any type of action including a calculation or an input/output operation. The flowlines in the figure indicate the order in which the actions are performed. C allows us to have as many actions as we want in a sequence structure.

Flow Chart When drawing a flowchart that represents a complete algorithm, an oval symbol containing the word Begin is the first symbol used in the flowchart; an oval symbol containing the word End is the last symbol used. When drawing only a portion of an algorithm, the oval symbols are omitted in favor of using small circle symbols, also called connector symbols. Perhaps the most important flowcharting symbol is the diamond symbol, also called the decision symbol, which indicates that a decision is to be made.

Pseudo Code Pseudocode is an artificial and informal language that helps you develop algorithms. Pseudocode is similar to everyday English; it s convenient and user friendly although it s not an actual computer programming language. Pseudocode programs are not executed on computers. Rather, they merely help you think out a program before attempting to write it in a programming language such as C.

Pseudo Code Pseudocode consists purely of characters, so you may conveniently type pseudocode programs into a computer using an editor program. A carefully prepared pseudocode program may be converted easily to a corresponding C program. Pseudocode consists only of action statements those that are executed when the program has been converted from pseudocode to C and is run in C.

Pseudo Code Definitions are not executable statements. They re messages to the compiler. For example, the definition int i; simply tells the compiler the type of variable i and instructs the compiler to reserve space in memory for the variable. But this definition does not cause any action such as input, output, or a calculation to occur when the program is executed.

Pseudo Code Some programmers choose to list each variable and briefly mention the purpose of each at the beginning of a pseudocode program.

Any Questions?