SlideShare a Scribd company logo
CONTROL STATEMENTS
LEARNING OBJECTIVES
 Understanding meaning of a statement and
statement block.
 Learn about decision type control constructs in C
and the way these are used.
 Learn about looping type control constructs in C
and the technique of putting them to use.
 Learn the use of special control constructs such as
goto, break, continue, and return.
 Learn about nested loops and their utility.
CONTROL STATEMENTS INCLUDE
Selection
Statements
• if
• if-else
• switch
Iteration
Statements
• for
• while
• do-while
Jump
Statements
• goto
• break
• continue
• return
PROGRAM CONTROL
STATEMENTS/CONSTRUCTS
Program Control
Statements/Constructs
Selection/Branching
Conditional
Type
if if-else
if-else-
if
switch
Unconditional
Type
break continue goto
Iteration/Looping
for while
do-
while
CONDITIONAL EXECUTION AND
SELECTION
• Selection Statements
• The Conditional Operator
• The switch Statement
SELECTION STATEMENTS
• One-way decisions using if statement
• Two-way decisions using if-else statement
• Multi-way decisions
• Dangling else Problem
ONE-WAY DECISIONS USING IF
STATEMENT
Flowchart for if construct
TestExpr
stmtT
WRITE A PROGRAM THAT PRINTS THE
LARGEST AMONG THREE NUMBERS.
Algorithm C Program
1. START #include <stdio.h>
int main()
{
int a, b, c, max;
printf(“nEnter 3 numbers”);
scanf(“%d %d %d”, &a, &b, &c);
max=a;
if(b>max)
max=b;
if(c>max)
max=c;
printf(“Largest No is %d”, max);
return 0;
}
2. PRINT “ENTER THREE
NUMBERS”
3. INPUT A, B, C
4. MAX=A
5. IF B>MAX THEN MAX=B
6. IF C>MAX THEN MAX=C
7. PRINT “LARGEST
NUMBER IS”, MAX
8. STOP
TWO-WAY DECISIONS USING
IF-ELSE STATEMENT
Flowchart of if-else construct
The form of a two-way
decision is as follows:
if(TestExpr)
stmtT;
else
stmtF;
TestExpr
stmtT stmtF
WRITE A PROGRAM THAT PRINTS THE
LARGEST AMONG THREE NUMBERS.
Algorithm C Program
1. START #include <stdio.h>
int main()
{
int a, b, c, max;
printf(“nEnter 3 numbers”);
scanf(“%d %d %d”, &a, &b, &c);
max=a;
if(b>max)
max=b;
if(c>max)
max=c;
printf(“Largest No is %d”, max);
return 0;
}
2. PRINT “ENTER THREE
NUMBERS”
3. INPUT A, B, C
4. MAX=A
5. IF B>MAX THEN MAX=B
6. IF C>MAX THEN MAX=C
7. PRINT “LARGEST
NUMBER IS”, MAX
8. STOP
MULTI-WAY DECISIONS
if-else-if ladder
if(TestExpr1)
stmtT1;
else if(TestExpr2)
stmtT2;
else if(TestExpr3)
stmtT3;
.. .
else if(TestExprN)
stmtTN;
else
stmtF;
General format of switch
statements
switch(expr)
{
case constant1: stmtList1;
break;
case constant2: stmtList2;
break;
case constant3: stmtList3;
break;
………………………….
………………………….
default: stmtListn;
}
FLOWCHART OF AN IF-
ELSE-IF CONSTRUCT
TestExpr
TestExpr2
TestExprN
TestExpr3
stmtT2
stmtTN
stmtT3
stmtTF
stmtT1
THE FOLLOWING PROGRAM CHECKS WHETHER A
NUMBER GIVEN BY THE USER IS ZERO, POSITIVE, OR
NEGATIVE
int main()
{
int x;
printf(“n ENTER THE NUMBER:”);
scanf(“%d”, &x);
if(x > 0)
printf(“x is positive n”);
else if(x == 0)
printf(“x is zero n”);
else
printf(“x is negative n”);
return 0;
NESTED IF
• When any if statement is
written under another if
statement, this cluster is
called a nested if.
• The syntax for the
nested is given here:
Construct 1 Construct 2
if(TestExprA)
if(TestExprB)
stmtBT;
else
stmtBF;
else
stmtAF;
if(TestExprA)
if(TestExprB)
stmtBT;
else
stmtBF;
else
if(TestExprC)
stmtCT;
else
stmtCF;
A PROGRAM TO FIND THE LARGEST AMONG
THREE NUMBERS USING THE NESTED LOOP
int main()
{
int a, b, c;
printf(“nEnter the three numbers”);
scanf(“%d %d %d”, &a, &b, &c);
if(a > b)
if(a > c)
printf(“%d”, a);
else
printf(“%d”, c);
else
if(b > c)
printf(“%d”, b);
else
printf(“%d”, c);
return 0;
}
DANGLING ELSE PROBLEM
• This classic problem occurs
when there is no matching
else for each if. To avoid this
problem, the simple C rule is
that always pair an else to the
most recent unpaired if in the
current block.
• The else is automatically
paired with the closest if.
But, it may be needed to
associate an else with the
outer if also.
SOLUTIONS TO DANGLING
ELSE PROBLEM
• Use of null else
• Use of braces to
enclose the true
action of the second if
With null else With braces
if(TestExprA)
if(TestExprB
)
stmtBT;
else
;
else
stmtAF;
if(TestExprA)
{
if(TestExprB
)
stmtBT;
}
else
stmtAF;
THE SWITCH STATEMENT
The C switch construct
switch(expr)
{
case constant1: stmtList1;
break;
case constant2: stmtList2;
break;
case constant3: stmtList3;
break;
………………………….
………………………….
default: stmtListn;
}
SWITCH VS NESTED IF
 The switch differs from the else-if in that switch can
test only for equality, whereas the if conditional
expression can be of a test expression involving any
type of relational operators and/or logical
operators.
 A switch statement is usually more efficient than
nested ifs.
 The switch statement can always be replaced with a
series of else-if statements.
ITERATION AND REPETITIVE
EXECUTION
• A loop allows one to execute
a statement or block of
statements repeatedly. There
are mainly two types of
iterations or loops –
unbounded iteration or
unbounded loop and bounded
iteration or bounded loop.
• A loop can either be a pre-test
loop or be a post-test loop as
illustrated in the diagram.
“WHILE” CONSTRUCT
Expanded Syntax of “while” and its
Flowchart Representation
• while statement is a
pretest loop. The basic
syntax of the while
statement is shown below:
AN EXAMPLE
#include <stdio.h>
int main()
{
int c;
c=5; // Initialization
while(c>0)
{ // Test Expression
printf(“ n %d”,c);
c=c-1; // Updating
}
return 0;
}
This loop contains all the
parts of a while loop. When
executed in a program, this
loop will output
5
4
3
2
1
TESTING FOR FLOATING-POINT
‘EQUALITY’
float x;
x = 0.0;
while(x != 1.1)
{
x = x + 0.1;
printf(“1.1 minus %f equals %.20gn”, x, 1.1 -x);
}
• The above loop never terminates on many computers,
because 0.1 cannot be accurately represented using
binary numbers.
• The correct way to make the test is to see if the two
numbers are ‘approximately equal’.
“FOR” CONSTRUCT
• The general form of the for statement is as follows:
for(initialization; TestExpr; updating)
statement;
for construct
flow chart
EXAMPLE
int main()
{
int n, s=0, r;
printf(“n Enter the Number”);
scanf(“%d”, &n);
for(;n>0;n/=10)
{
r=n%10;
s=s+r;
}
printf(“n Sum of digits %d”, s);
return 0;
}
“DO-WHILE” CONSTRUCT
• The form of this loop construct is as follows:
do
{
statement; /* body of statements would be
placed here*/
} while(TestExpression);
• With a do-while statement, the body of the loop is
executed first and the test expression is checked
after the loop body is executed.
• Thus, the do-while statement always executes the
loop body at least once.
#include <stdio.h>
int main()
{
int x = 1;
int count = 0;
do {
scanf(“%d”, &x);
if(x >= 0) count += 1;
} while(x >= 0);
return 0;
}
Some methods of controlling repetition in a
program are:
 Using Sentinel Values
 Using Prime Read
 Using Counter
GOTO STATEMENT
• The control is unconditionally transferred to
the statement associated with the label
specified in the goto statement.
• The form of a goto statement is
goto label_name;
The following program is used to find the factorial of a
number.
int main()
{
int n, c;
long int f=1;
printf(“n Enter the number:”);
scanf(“%d”,&n);
if(n<0)
goto end;
for(c=1; c<=n; c++)
f*=c;
printf(“n FACTORIAL IS %ld”, f);
end:
}
“BREAK” AND “CONTINUE”
break continue
1. It helps to make an early
exit from the block where it
appears.
1. It helps in avoiding the
remaining statements in a
current iteration of the loop
and continuing with the next
Iteration
2. It can be used in all control
statements including switch
construct.
2. It can be used only in loop
constructs.
NESTED LOOPS
 A nested loop refers to a
loop that is contained
within another loop.
 If the following output
has to be obtained on the
screen
1
2 2
3 3 3
4 4 4 4
then the corresponding
program will be
#include <stdio.h>
int main()
{
int row, col;
for(row=1;row<=4;++row)
{
for(col=1;col<=row;++col)
printf(“%d t”, row);
printf(“n”);
}
return 0;
}

More Related Content

PPT
Control statments in c
PPTX
Flow of control C ++ By TANUJ
PPTX
CONTROL STMTS.pptx
PDF
PROBLEM SOLVING USING NOW PPSC- UNIT -2.pdf
PPTX
C PROGRAMMING-CONTROL STATEMENT (IF-ELSE, SWITCH)
PPS
Programming in Arduino (Part 2)
PPTX
Control Flow Statements
PPTX
Managing input and output operations & Decision making and branching and looping
Control statments in c
Flow of control C ++ By TANUJ
CONTROL STMTS.pptx
PROBLEM SOLVING USING NOW PPSC- UNIT -2.pdf
C PROGRAMMING-CONTROL STATEMENT (IF-ELSE, SWITCH)
Programming in Arduino (Part 2)
Control Flow Statements
Managing input and output operations & Decision making and branching and looping

Similar to C-Programming Control statements.pptx (20)

PPTX
Btech i pic u-3 handling input output and control statements
PPTX
Mca i pic u-3 handling input output and control statements
PPTX
handling input output and control statements
PPTX
Diploma ii cfpc u-3 handling input output and control statements
PPT
03 conditions loops
PPT
PPTX
Bsc cs pic u-3 handling input output and control statements
PPT
Control statements
PPTX
unit2 C-ProgrammingChapter 2 Control statements.pptx
PPT
M C6java6
PPTX
C Programming - Decision making, Looping
PPTX
C Programming Control Structures(if,if-else)
PPTX
Condition Stmt n Looping stmt.pptx
PPTX
Control Structures.pptx
PPTX
SwitchandlomahsjhASSJjajdjsdjdjjjop.pptx
PDF
Control statements anil
PPTX
Module 2- Control Structures
PPT
C++ chapter 4
PPTX
Decision Making Statement in C ppt
PDF
Control flow statements in java web applications
Btech i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statements
handling input output and control statements
Diploma ii cfpc u-3 handling input output and control statements
03 conditions loops
Bsc cs pic u-3 handling input output and control statements
Control statements
unit2 C-ProgrammingChapter 2 Control statements.pptx
M C6java6
C Programming - Decision making, Looping
C Programming Control Structures(if,if-else)
Condition Stmt n Looping stmt.pptx
Control Structures.pptx
SwitchandlomahsjhASSJjajdjsdjdjjjop.pptx
Control statements anil
Module 2- Control Structures
C++ chapter 4
Decision Making Statement in C ppt
Control flow statements in java web applications
Ad

More from SKUP1 (20)

PPTX
serial_busses_i2c.pptx
PPTX
DESIGN PATTERN.pptx
PPTX
INTER PROCESS COMMUNICATION (IPC).pptx
PPTX
DATA STRUCTURES AND LINKED LISTS IN C.pptx
PPTX
C-Programming File-handling-C.pptx
PPTX
Processes, Threads.pptx
PPTX
Finite State Machine.ppt.pptx
PPTX
FUNCTIONS IN C.pptx
PPTX
cprogramming strings.pptx
PPTX
UNIONS IN C.pptx
PPTX
OPERATORS IN C.pptx
PPTX
cprogramming Structures.pptx
PPTX
C-Programming Function pointers.pptx
PPTX
POINTERS.pptx
PPTX
STACKS AND QUEUES.pptx
PPTX
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
PPTX
C MEMORY MODEL​.pptx
PPTX
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
PPTX
DYNAMIC MEMORY ALLOCATION.pptx
PPTX
COMPILATION PROCESS IN C.pptx
serial_busses_i2c.pptx
DESIGN PATTERN.pptx
INTER PROCESS COMMUNICATION (IPC).pptx
DATA STRUCTURES AND LINKED LISTS IN C.pptx
C-Programming File-handling-C.pptx
Processes, Threads.pptx
Finite State Machine.ppt.pptx
FUNCTIONS IN C.pptx
cprogramming strings.pptx
UNIONS IN C.pptx
OPERATORS IN C.pptx
cprogramming Structures.pptx
C-Programming Function pointers.pptx
POINTERS.pptx
STACKS AND QUEUES.pptx
C-Programming C LIBRARIES AND USER DEFINED LIBRARIES.pptx
C MEMORY MODEL​.pptx
DATATYPES,KEYWORDS,FORMATSPECS[1].pptx
DYNAMIC MEMORY ALLOCATION.pptx
COMPILATION PROCESS IN C.pptx
Ad

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Complications of Minimal Access Surgery at WLH
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Insiders guide to clinical Medicine.pdf
PPTX
master seminar digital applications in india
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Pharma ospi slides which help in ospi learning
PDF
RMMM.pdf make it easy to upload and study
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Cell Types and Its function , kingdom of life
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
Anesthesia in Laparoscopic Surgery in India
Complications of Minimal Access Surgery at WLH
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Cell Structure & Organelles in detailed.
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Insiders guide to clinical Medicine.pdf
master seminar digital applications in india
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Basic Mud Logging Guide for educational purpose
Pharma ospi slides which help in ospi learning
RMMM.pdf make it easy to upload and study
Abdominal Access Techniques with Prof. Dr. R K Mishra
O7-L3 Supply Chain Operations - ICLT Program
GDM (1) (1).pptx small presentation for students
Cell Types and Its function , kingdom of life
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
01-Introduction-to-Information-Management.pdf
Final Presentation General Medicine 03-08-2024.pptx
Supply Chain Operations Speaking Notes -ICLT Program

C-Programming Control statements.pptx

  • 2. LEARNING OBJECTIVES  Understanding meaning of a statement and statement block.  Learn about decision type control constructs in C and the way these are used.  Learn about looping type control constructs in C and the technique of putting them to use.  Learn the use of special control constructs such as goto, break, continue, and return.  Learn about nested loops and their utility.
  • 3. CONTROL STATEMENTS INCLUDE Selection Statements • if • if-else • switch Iteration Statements • for • while • do-while Jump Statements • goto • break • continue • return
  • 4. PROGRAM CONTROL STATEMENTS/CONSTRUCTS Program Control Statements/Constructs Selection/Branching Conditional Type if if-else if-else- if switch Unconditional Type break continue goto Iteration/Looping for while do- while
  • 5. CONDITIONAL EXECUTION AND SELECTION • Selection Statements • The Conditional Operator • The switch Statement
  • 6. SELECTION STATEMENTS • One-way decisions using if statement • Two-way decisions using if-else statement • Multi-way decisions • Dangling else Problem
  • 7. ONE-WAY DECISIONS USING IF STATEMENT Flowchart for if construct TestExpr stmtT
  • 8. WRITE A PROGRAM THAT PRINTS THE LARGEST AMONG THREE NUMBERS. Algorithm C Program 1. START #include <stdio.h> int main() { int a, b, c, max; printf(“nEnter 3 numbers”); scanf(“%d %d %d”, &a, &b, &c); max=a; if(b>max) max=b; if(c>max) max=c; printf(“Largest No is %d”, max); return 0; } 2. PRINT “ENTER THREE NUMBERS” 3. INPUT A, B, C 4. MAX=A 5. IF B>MAX THEN MAX=B 6. IF C>MAX THEN MAX=C 7. PRINT “LARGEST NUMBER IS”, MAX 8. STOP
  • 9. TWO-WAY DECISIONS USING IF-ELSE STATEMENT Flowchart of if-else construct The form of a two-way decision is as follows: if(TestExpr) stmtT; else stmtF; TestExpr stmtT stmtF
  • 10. WRITE A PROGRAM THAT PRINTS THE LARGEST AMONG THREE NUMBERS. Algorithm C Program 1. START #include <stdio.h> int main() { int a, b, c, max; printf(“nEnter 3 numbers”); scanf(“%d %d %d”, &a, &b, &c); max=a; if(b>max) max=b; if(c>max) max=c; printf(“Largest No is %d”, max); return 0; } 2. PRINT “ENTER THREE NUMBERS” 3. INPUT A, B, C 4. MAX=A 5. IF B>MAX THEN MAX=B 6. IF C>MAX THEN MAX=C 7. PRINT “LARGEST NUMBER IS”, MAX 8. STOP
  • 11. MULTI-WAY DECISIONS if-else-if ladder if(TestExpr1) stmtT1; else if(TestExpr2) stmtT2; else if(TestExpr3) stmtT3; .. . else if(TestExprN) stmtTN; else stmtF; General format of switch statements switch(expr) { case constant1: stmtList1; break; case constant2: stmtList2; break; case constant3: stmtList3; break; …………………………. …………………………. default: stmtListn; }
  • 12. FLOWCHART OF AN IF- ELSE-IF CONSTRUCT TestExpr TestExpr2 TestExprN TestExpr3 stmtT2 stmtTN stmtT3 stmtTF stmtT1
  • 13. THE FOLLOWING PROGRAM CHECKS WHETHER A NUMBER GIVEN BY THE USER IS ZERO, POSITIVE, OR NEGATIVE int main() { int x; printf(“n ENTER THE NUMBER:”); scanf(“%d”, &x); if(x > 0) printf(“x is positive n”); else if(x == 0) printf(“x is zero n”); else printf(“x is negative n”); return 0;
  • 14. NESTED IF • When any if statement is written under another if statement, this cluster is called a nested if. • The syntax for the nested is given here: Construct 1 Construct 2 if(TestExprA) if(TestExprB) stmtBT; else stmtBF; else stmtAF; if(TestExprA) if(TestExprB) stmtBT; else stmtBF; else if(TestExprC) stmtCT; else stmtCF;
  • 15. A PROGRAM TO FIND THE LARGEST AMONG THREE NUMBERS USING THE NESTED LOOP int main() { int a, b, c; printf(“nEnter the three numbers”); scanf(“%d %d %d”, &a, &b, &c); if(a > b) if(a > c) printf(“%d”, a); else printf(“%d”, c); else if(b > c) printf(“%d”, b); else printf(“%d”, c); return 0; }
  • 16. DANGLING ELSE PROBLEM • This classic problem occurs when there is no matching else for each if. To avoid this problem, the simple C rule is that always pair an else to the most recent unpaired if in the current block. • The else is automatically paired with the closest if. But, it may be needed to associate an else with the outer if also.
  • 17. SOLUTIONS TO DANGLING ELSE PROBLEM • Use of null else • Use of braces to enclose the true action of the second if With null else With braces if(TestExprA) if(TestExprB ) stmtBT; else ; else stmtAF; if(TestExprA) { if(TestExprB ) stmtBT; } else stmtAF;
  • 18. THE SWITCH STATEMENT The C switch construct switch(expr) { case constant1: stmtList1; break; case constant2: stmtList2; break; case constant3: stmtList3; break; …………………………. …………………………. default: stmtListn; }
  • 19. SWITCH VS NESTED IF  The switch differs from the else-if in that switch can test only for equality, whereas the if conditional expression can be of a test expression involving any type of relational operators and/or logical operators.  A switch statement is usually more efficient than nested ifs.  The switch statement can always be replaced with a series of else-if statements.
  • 20. ITERATION AND REPETITIVE EXECUTION • A loop allows one to execute a statement or block of statements repeatedly. There are mainly two types of iterations or loops – unbounded iteration or unbounded loop and bounded iteration or bounded loop. • A loop can either be a pre-test loop or be a post-test loop as illustrated in the diagram.
  • 21. “WHILE” CONSTRUCT Expanded Syntax of “while” and its Flowchart Representation • while statement is a pretest loop. The basic syntax of the while statement is shown below:
  • 22. AN EXAMPLE #include <stdio.h> int main() { int c; c=5; // Initialization while(c>0) { // Test Expression printf(“ n %d”,c); c=c-1; // Updating } return 0; } This loop contains all the parts of a while loop. When executed in a program, this loop will output 5 4 3 2 1
  • 23. TESTING FOR FLOATING-POINT ‘EQUALITY’ float x; x = 0.0; while(x != 1.1) { x = x + 0.1; printf(“1.1 minus %f equals %.20gn”, x, 1.1 -x); } • The above loop never terminates on many computers, because 0.1 cannot be accurately represented using binary numbers. • The correct way to make the test is to see if the two numbers are ‘approximately equal’.
  • 24. “FOR” CONSTRUCT • The general form of the for statement is as follows: for(initialization; TestExpr; updating) statement; for construct flow chart
  • 25. EXAMPLE int main() { int n, s=0, r; printf(“n Enter the Number”); scanf(“%d”, &n); for(;n>0;n/=10) { r=n%10; s=s+r; } printf(“n Sum of digits %d”, s); return 0; }
  • 26. “DO-WHILE” CONSTRUCT • The form of this loop construct is as follows: do { statement; /* body of statements would be placed here*/ } while(TestExpression);
  • 27. • With a do-while statement, the body of the loop is executed first and the test expression is checked after the loop body is executed. • Thus, the do-while statement always executes the loop body at least once.
  • 28. #include <stdio.h> int main() { int x = 1; int count = 0; do { scanf(“%d”, &x); if(x >= 0) count += 1; } while(x >= 0); return 0; }
  • 29. Some methods of controlling repetition in a program are:  Using Sentinel Values  Using Prime Read  Using Counter
  • 30. GOTO STATEMENT • The control is unconditionally transferred to the statement associated with the label specified in the goto statement. • The form of a goto statement is goto label_name;
  • 31. The following program is used to find the factorial of a number. int main() { int n, c; long int f=1; printf(“n Enter the number:”); scanf(“%d”,&n); if(n<0) goto end; for(c=1; c<=n; c++) f*=c; printf(“n FACTORIAL IS %ld”, f); end: }
  • 32. “BREAK” AND “CONTINUE” break continue 1. It helps to make an early exit from the block where it appears. 1. It helps in avoiding the remaining statements in a current iteration of the loop and continuing with the next Iteration 2. It can be used in all control statements including switch construct. 2. It can be used only in loop constructs.
  • 33. NESTED LOOPS  A nested loop refers to a loop that is contained within another loop.  If the following output has to be obtained on the screen 1 2 2 3 3 3 4 4 4 4 then the corresponding program will be #include <stdio.h> int main() { int row, col; for(row=1;row<=4;++row) { for(col=1;col<=row;++col) printf(“%d t”, row); printf(“n”); } return 0; }