http://eglobiotraining.com/
http://eglobiotraining.com/
> A switch, case, select or inspect statement is a type of selection   control mechanism that exists in most imperative pr...
1. The If – else Statement  >The if statement allows the programmer to make  decisions within a program.   > The general f...
If statement (two alternatives) Form:  If (condition)     Note: if condition evaluates to true, then statement is      sta...
   If we know how to write a C expression that is    equivalent of a question such as “Is resting the value    of express...
 1. Open Dev C++ 2. Click File and choose New 3. Post your Statements 4. after you post your statement 5. Save it .ch...
http://eglobiotraining.com/
The below program uses a switch statement to validate and select upon the users input choice, simulating a simple menu of ...
When it compiles and run, this will be it looks like .The C expression that was type it on Dev C++The words are “enter in ...
Example of SwitchCase Statement , youWill see the statementon the link that you see in this slide. Link:http://www.morrowl...
After I compile it and run it, the statement is now like this. As youCan see after you answer the 1st question the next qu...
Function and target of      Programming language :     A computer programming   language is a language. used    to write c...
When the statement is done it will look like this.I got this from the URL . The URL was posted on the previous            ...
Did You Know?                                                 The first programming                                       ...
Did You Know ?All programming languages have some primitive building blocks for thedescription of data and the processes o...
http://eglobiotraining.com/
Link: http://www.cfanatic.com/topic4267/                                      http://eglobiotraining.com/
http://eglobiotraining.com/
Looping Statements> Loops execute a block of code a specified  number of times, or while a specified condition  is true.> ...
While structure is another type of loop statements,where the condition is checked at first, the iterationwill not stop eve...
> Do while statement is same as the while  statement , the only difference is that it  evaluates the expression at the end...
> The for loop is used when you know in advance how   many times the script should run.> Be for statement takes three expr...
Form:       for {initialization; condition:      increment )          {           code to be executed          }http://www...
   For Each structure is a loop structure used    for arraysForm:foreach(array as value){  code to be executed}Foreach (a...
> Break ends the execution of the for, for  each, while, do-while or switch  statement.Form:* Break ( optional numeric arg...
> “Continue” is used to skip the current loop   iteration and continue with the next iteration of   the loop. But “Break” ...
http://www.morrowland.com/apron/tutorials/cpp/cpp_for_loop/index.php                                      The for         ...
http://www.morrowland.com/apron/tutorials/cpp/cpp_for_loop/index.php                                         http://eglobi...
http://www.morrowland.com/apron/tutorials/cpp/cpp_do_while_loop/index.php                                     Do while    ...
http://eglobiotraining.com/
http://www.exforsys.com/tutorials/c-plus-plus/looping-in-c.html                                          While loop       ...
http://eglobiotraining.com/
http://cprogramminglanguage.net/c-break-continue-statements.aspx                                            Break and     ...
http://eglobiotraining.com/
http://www.w3schools.com/php/php_looping_for.asp       Foreach loop                                     http://eglobiotrai...
http://eglobiotraining.com/
http://en.wikipedia.org/wiki/Switch_statem  ent   http://www.morrowland.com/apron/tutorials   /cpp/cpp_switch_case/index.p...
http://eglobiotraining.com/
Upcoming SlideShare
Loading in...5
×

Deguzmanpresentationprogramming

178

Published on

MY PROJECT FOR PROGRAMMING FOR MR. ERWIN M. GLOBIO.

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
178
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Deguzmanpresentationprogramming

  1. 1. http://eglobiotraining.com/
  2. 2. http://eglobiotraining.com/
  3. 3. > A switch, case, select or inspect statement is a type of selection control mechanism that exists in most imperative programming languages such as Pascal, Ada, C/C++, C#, Java, and so on. It is also included in several other types of languages. Its purpose is to allow the value of a variable or expression to control the flow of program execution via a multiway branch (or "goto", one of several labels).The Main Reason using switch case : > To improve clarity, by reducing otherwise repetitive coding, and (if the heuristics permit) also offering the potential for faster execution through easier compiler optimization in many cases. http://eglobiotraining.com/
  4. 4. 1. The If – else Statement >The if statement allows the programmer to make decisions within a program. > The general format of an if statement is: If (expression) statement -Where expression represents a relational, equality, or logical expression ( conditional expression) . http://eglobiotraining.com /
  5. 5. If statement (two alternatives) Form: If (condition) Note: if condition evaluates to true, then statement is statement; executed and statement is skipped; otherwise, statement is else skipped and statement is executed statement;If statement (One-Alternatives) Form: If (condition) Note: if condition evaluates to true, then statement is statement; executed and statement is skippedFormat of the if statement- All if statement examples in this text indent statements. The word elseIs typed without indention on a separate line. The format of the if statementmakes its meaning apparent and is used solely to improve program readability;The format makes no difference to the computer http://eglobiotraining.com/
  6. 6.  If we know how to write a C expression that is equivalent of a question such as “Is resting the value of expression to select a course of action. In C, the statement is the primary selection control structure Me: it’s hard to write c expression. So, I just copy and paste it into internet. A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely. http://eglobiotraining.com/
  7. 7.  1. Open Dev C++ 2. Click File and choose New 3. Post your Statements 4. after you post your statement 5. Save it .choose file and save or 6. click f9 or you can see it shaped like a square http://eglobiotraining.com/
  8. 8. http://eglobiotraining.com/
  9. 9. The below program uses a switch statement to validate and select upon the users input choice, simulating a simple menu of choices.Link: http://gd.tuwien.ac.at/languages/c/programming- bbrown/c_028.htm http://eglobiotraining.com/
  10. 10. When it compiles and run, this will be it looks like .The C expression that was type it on Dev C++The words are “enter in two number  24” http://eglobiotraining.com/
  11. 11. Example of SwitchCase Statement , youWill see the statementon the link that you see in this slide. Link:http://www.morrowland.com/apron/tutorials/cpp/cpp_switch_case/index.php http://eglobiotraining.com/
  12. 12. After I compile it and run it, the statement is now like this. As youCan see after you answer the 1st question the next question appearAnd after you finish all the question the box will disappear. It meansfinish. http://eglobiotraining.com/
  13. 13. Function and target of Programming language : A computer programming language is a language. used to write computer programs, which involve a computer performing some kind of computation or algorithm and possibly control external devices such as printers , disk drives , robots, and so on. Link:http://www.morrowland.com/apron/tutorials/cpp/cpp_if_else/index.php http://eglobiotraining.com/
  14. 14. When the statement is done it will look like this.I got this from the URL . The URL was posted on the previous slide http://eglobiotraining.com/
  15. 15. Did You Know? The first programming languages predate the modern computer. The 19th century saw the invention of "programmable" looms and pl ayer piano scrolls, both of which implemented examples of domain-specific languages.http://msdn.microsoft.com/en-us/library/66k51h7a(v=vs.80).aspx http://eglobiotraining.com/
  16. 16. Did You Know ?All programming languages have some primitive building blocks for thedescription of data and the processes or transformations applied to them(like theaddition of two numbers or the selection of an item from a collection). Theseprimitives are defined by syntactic and semantic rules which describe theirstructure and meaning respectively. http://eglobiotraining.com/
  17. 17. http://eglobiotraining.com/
  18. 18. Link: http://www.cfanatic.com/topic4267/ http://eglobiotraining.com/
  19. 19. http://eglobiotraining.com/
  20. 20. Looping Statements> Loops execute a block of code a specified number of times, or while a specified condition is true.> in PHP, the following looping statements are used: *The while Loop * The Do… While Loop * The For Loop *The Foreach Loop *Break and continue statementhttp://www.slideshare.net/ilakkiya/looping-statement
  21. 21. While structure is another type of loop statements,where the condition is checked at first, the iterationwill not stop even if the value changes while executingstatements. Form: While(condition) { code to be executed; } http://www.slideshare.net/ilakkiya/looping-statement http://eglobiotraining.com/
  22. 22. > Do while statement is same as the while statement , the only difference is that it evaluates the expression at the end. Form: do { code to be executed; } while (condition): http://www.slideshare.net/ilakkiya/looping-statement
  23. 23. > The for loop is used when you know in advance how many times the script should run.> Be for statement takes three expressions inside its parentheses seperated by semi-colons. When the for loop executes, the following occurs:> The initializing expression is executed. This expression usually initializes oneor more loop counter, but the syntax allow expression any degree of complexity.> The condition expression is evaluated. Of the value of condition is true, the loop statements execute. If the value of condition is false, the for loop terminates.http://www.slideshare.net/ilakkiya/looping-statement http://eglobiotraining.com/
  24. 24. Form: for {initialization; condition: increment ) { code to be executed }http://www.slideshare.net/ilakkiya/looping-statement http://eglobiotraining.com/
  25. 25.  For Each structure is a loop structure used for arraysForm:foreach(array as value){ code to be executed}Foreach (array as key => value){ code to be executed http://www.slideshare.net/ilakkiya/looping-statement} http://eglobiotraining.com/
  26. 26. > Break ends the execution of the for, for each, while, do-while or switch statement.Form:* Break ( optional numeric argument) http://www.slideshare.net/ilakkiya/looping-statement http://eglobiotraining.com/
  27. 27. > “Continue” is used to skip the current loop iteration and continue with the next iteration of the loop. But “Break” is to exit from the whole loop. Form: * Break ( optional numeric argument) http://www.slideshare.net/ilakkiya/looping-statement http://eglobiotraining.com/
  28. 28. http://www.morrowland.com/apron/tutorials/cpp/cpp_for_loop/index.php The for loop http://eglobiotraining.com/
  29. 29. http://www.morrowland.com/apron/tutorials/cpp/cpp_for_loop/index.php http://eglobiotraining.com/
  30. 30. http://www.morrowland.com/apron/tutorials/cpp/cpp_do_while_loop/index.php Do while loop http://eglobiotraining.com/
  31. 31. http://eglobiotraining.com/
  32. 32. http://www.exforsys.com/tutorials/c-plus-plus/looping-in-c.html While loop http://eglobiotraining.com/
  33. 33. http://eglobiotraining.com/
  34. 34. http://cprogramminglanguage.net/c-break-continue-statements.aspx Break and continue http://eglobiotraining.com/
  35. 35. http://eglobiotraining.com/
  36. 36. http://www.w3schools.com/php/php_looping_for.asp Foreach loop http://eglobiotraining.com/
  37. 37. http://eglobiotraining.com/
  38. 38. http://en.wikipedia.org/wiki/Switch_statem ent http://www.morrowland.com/apron/tutorials /cpp/cpp_switch_case/index.php http://gd.tuwien.ac.at/languages/c/program ming-bbrown/c_028.htm http://eglobiotraining.com/
  39. 39. http://eglobiotraining.com/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×