O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

decision making in c.pptx

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
C Programming Language Part 6
C Programming Language Part 6
Carregando em…3
×

Confira estes a seguir

1 de 9 Anúncio

Mais Conteúdo rRelacionado

Semelhante a decision making in c.pptx (20)

Mais recentes (20)

Anúncio

decision making in c.pptx

  1. 1. SUBMITTED BY DR.G.AMBIKA ASST.PROF OF IT BON SECOURS COLLEGE FOR WOMEN, THANJAVUR PROGRAMMING IN C DECISION MAKING AND LOOPING
  2. 2. DECISION MAKING AND LOOPING DECISION MAKING: decision making statement in programming language help the programmer to transfer the contral from one part to other part of the program.
  3. 3. What is looping?  The iteration control structure are used for repeatively excuting a block of code multiple times,until the condition is false. looping For loop While loop Do while looping
  4. 4. For loop;  It is “Entry controlled loop”. SYNTAX: for(initialization:test condition ;in/dc) { statement; }
  5. 5. program: #include<stdio.h> #include<conio.h> Void main ( ) clrscr( ) for(int a=0,a<=10,a++) { printf(“%dn”,a); } getch( ); }
  6. 6. While loop:  A while loop execute stmt repeatedly until condition is false. SYNTAX: While(condition) { stmt; }
  7. 7. program: #include<stdio.h> #include<conio.h> Void main( ) { int n=1; clrscr( ); while(n) { printf(“n%d”,n); ++n; } getch(); }
  8. 8. Do while loop:  Do while loop excute the statement first after that it check the condition . SYNTAX: do { state; } while(condition);
  9. 9. Program: #include<stdio.h> #include<conio.h> Void main() { clrscr( ); do { print(“hello guyst”) } while(5): { printf(“bye guys”); } getch( ); }

×