Professional Documents
Culture Documents
Lecture 6 C Selection Statements
Lecture 6 C Selection Statements
Statements:
Part I
© G.Y.Namani Control Statements Part I Slide 1
Selection
Statements
© G.Y.Namani Control Statements Part I Slide 2
Introduction
• Control of statements "control" which
sections of code in a program are
executed.
• Specifying the order in which
statements (actions) execute in a
program is called program control.
}
© G.Y.Namani Control Statements Part I Slide 19
Nested if…else statements
cont…
/*the program that uses nested
if...else statement*/
#include<stdio.h>
int main(){
int x=4, y=5, z=6, biggest;
if(x>y && x>z){
biggest=x;