BIL104E_w2 - BIL104E INTRODUCTION TO SCIENTIFIC AND...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
BIL104E INTRODUCTION TO SCIENTIFIC AND ENGINEERING COMPUTING (C) WEEK - 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Operators Arithmetic Operators +, - , / , * , % , ++ , -- Relational Operators <,>,<=,>=,==,!= Logical Operators !,&&,||
Background image of page 2
Operators Assigment Operators ++ ++a : Increment a by 1, then use the new value of a in the expression in which a resides. ++ a++ : Use the current value of a in the expression in which a resides, then increment a by 1. -- -- b : Decrement b by 1, then use the new value of b in the expression which b resides. -- b -- : Use the current value of b in the expression in which b resides, then decrement b by 1.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
If / If-else if ( condition 1 ) { instraction 1 } else if ( condition 2 ) { instraction 2 } . . . else if ( condition n ) { instraction n } else { instraction n }
Background image of page 4
If / If-else #include <stdio.h> main() { float a; printf("Please enter the value of angle which is between 0.0 and 180.0\n"); scanf("%f",&a); if((a<0.0)||(a>180.0)) printf("The value of the angle is not between 0.0 and 180.0 \n Program quits \n");
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/22/2010 for the course BIL 104 taught by Professor Abc during the Fall '09 term at Istanbul Technical University.

Page1 / 14

BIL104E_w2 - BIL104E INTRODUCTION TO SCIENTIFIC AND...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online