MAT181 PROGRAMMING FOR SCIENTIFIC APPLICATIONS

Chapter 1: Introduction to C++ Program

Chapter 2: Simple Choices and Repetition

COMPUTER

PROGRAMMING LANGUAGES

Software

Hardware

Assembly
language

High level
language

Machine
language (0 // 1)

TYPES OF ERROR

Syntax
errors

Sematic / Logic error

Run-time error

Precedence of Operators

Arithmetic operators

. Relational operators

Statement Blocks

Annotation 2021-05-02 221315

Annotation 2021-05-02 221334

While Loop

Syntax

Definition

Annotation 2021-05-02 221603

used to repeatedly execute a particular statement or a compound statement

Chapter 3: Problem solving and program design

SDLC

  1. Design
  1. Implementation/Coding
  1. Analysis
  1. Testing and Verification
  1. User-requirement specification
  1. Documentation and Maintenance

Developing algorithm

Designing output appearance

Chapter 4: More control structures and operators

Switch

do-while

break statement

continue statement

for

Go-to statement

used to execute one of many choices or actions depending on the expression value.

: Annotation 2021-05-02 223313

Another facility provided by C++ to perform repetitive procedure.

click to edit

for (initial_Value; loop_control_condition;increment/decrement_expression)

The do-while loop is a post-test repetitive procedure provided by C++.

Annotation 2021-05-02 223953

The break statement is used to exit the current control statement such
as in while, for, do-while or switch, and execute the next statement after the loop.

Use the continue statement within loops to pass control to the end of the
innermost enclosing brace; and Execute the next expression in the loop.

Chapter 5: Output formatting

include<iomaniap>

Setw

Setiosflags

Setfill

Setprecision