SlideShare una empresa de Scribd logo
1 de 35
Project
                      in
        Fundamental Programming

By: Eunice B. Socubus
      BM10203
                        http://eglobiotraining.com/
Looping Statement
       &
  Switch Case
     http://eglobiotraining.com/
Table Of Content:
 Programming
 Looping
    For
    While
    Do while

   Switch Case
     If
     Else
     Then


                 http://eglobiotraining.com/
Programming
   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.
   The earliest programming languages predate the invention of the computer,
    and were used to direct the behavior of machines such as Jacquard looms
    and player pianos citation needed]. Thousands of different programming
    languages have been created, mainly in the computer field, with many
    more being created every year. Most programming languages describe
    computation in an imperative style, i.e., as a sequence of commands,
    although some languages, such as those that support functional
    programming or logic programming, use alternative forms of description.
   The description of a programming language is usually split into the two
    components of Syntax (form) and semantics (meaning). Some languages
    are defined by a specification document (for example, the C programming
    language is specified by an ISO Standard), while other languages, such
    as Perl 5 and earlier, have a dominant implementation that is used as
    a reference.
                          http://eglobiotraining.com/
   A programming language is a notation for writing programs, which are specifications of a
    computation or algorithm. Some, but not all, authors restrict the term "programming language"
    to those languages that can express all possible algorithms. Traits often considered important
    for what constitutes a programming language include:
   Function and target: 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.
    For example PostScript programs are frequently created by another program to control a
    computer printer or display. More generally, a programming language may describe
    computation on some, possibly abstract, machine. It is generally accepted that a complete
    specification for a programming language includes a description, possibly idealized, of a
    machine or processor for that language. In most practical contexts, a programming language
    involves a computer; consequently, programming languages are usually defined and studied
    this way. Programming languages differ from natural languages in that natural languages are
    only used for interaction between people, while programming languages also allow humans to
    communicate instructions to machines.
   Abstractions: Programming languages usually contain abstractions for defining and
    manipulating data structures or controlling the flow of execution. The practical necessity that a
    programming language support adequate abstractions is expressed by the abstraction
    principle; this principle is sometimes formulated as recommendation to the programmer to
    make proper use of such abstractions.
   Expressive power: The theory of computation classifies languages by the computations they
    are capable of expressing. All Turing complete languages can implement the same set
    of algorithms. ANSI/ISO SQL and Charity are examples of languages that are not Turing
    complete, yet often called programming languages.




                                 http://eglobiotraining.com/
Looping Statements
   Loops are used to repeat a block of code in programming. Being able to
    have your program repeatedly execute a block of code is one of the most
    basic but useful tasks in programming. There are three types of Looping
    Statement,

    These are:

   For

   While

   Do while


                          http://eglobiotraining.com/
For Loop Statement

   Terminates the loop or switch statement and
    transfers execution to the statement
    immediately following the loop or switch.




                 http://eglobiotraining.com/
While Loop Statement

   Repeats a statement or group of statements
    until a given condition is true. It tests the
    condition before executing the loop body.




                  http://eglobiotraining.com/
Do…While Loop Statement

   Like a while statement, except that it tests the
    condition at the end of the loop body.




                  http://eglobiotraining.com/
Switch Case Statement

•   In programming, 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.




                       http://eglobiotraining.com/
Sample Programs




  http://eglobiotraining.com/
Codes & Outputs in Switch Case
         http://eglobiotraining.com/
This Program uses a Switch Case
          Statement so that the user will
          have a choice. It contains days,
         each days have a own number to
           know where do they belong.




http://eglobiotraining.com/
When you run the program, this
         will be the sample output. The
      Program wants you to give a number
        and then it will give you the Day.




http://eglobiotraining.com/
This program is a Grading System, it
        Converts percent into average.




http://eglobiotraining.com/
When you run the program, this is the
 sample output. The conversion is shown
               in the box.




http://eglobiotraining.com/
This program is use for ATM
            machines, it computes Credit
             Limit and Total Purchased.




http://eglobiotraining.com/
This output shown the
           Computation and the remaining
                      credit.




http://eglobiotraining.com/
This program is for reservation
     of seats and it will compute the
      total price of the reservation.




http://eglobiotraining.com/
Here is the output of the program,
 it contains how the reservation is done,
        the price and the Total Sale.




http://eglobiotraining.com/
You will just type what numbers you
             like most and letters in this
                        Program.



http://eglobiotraining.com/
In this output, when you choose a number
       And letter it will simply reply.




 http://eglobiotraining.com/
Codes & Outputs in Looping
        Statement

       http://eglobiotraining.com/
This program uses Looping
           Statement, this program show
                        the
                 Rows and columns.




http://eglobiotraining.com/
You will just simply input
 number of rows and columns,
the program will automatically
       show the output.




                  http://eglobiotraining.com/
In this program, I just
                  use DO and While.




http://eglobiotraining.com/
The output shows
              numbers 10 up to 99 in
                      order




http://eglobiotraining.com/
I use For Statement so that
              the program will loop.



http://eglobiotraining.com/
The output is this, when you
        input a number, it will show
          the number, square, and
                   cube.




http://eglobiotraining.com/
This program
                        will compute
                       the Total Sales
                       of the Number
                        of Seats and
                            Price.




http://eglobiotraining.com/
This is where you
                     will see the
                  computation and
                  how the program
                          run.



http://eglobiotraining.com/
This code is just simply
            display numbers 0 to 8.




http://eglobiotraining.com/
This is the sample
  output of the
    program.




             http://eglobiotraining.com/
    Slideshare.net 
   Account: socubus0527
   http://www.slideshare.net/recto1136
    9121/fundamentals-of-programming-
    final 




              http://eglobiotraining.com/
In partial fulfillment of requirements in
      Fundamental Programming



Submitted to: Prof. Erwin Globio
   http://eglobiotraining.com/
Submitted by: Eunice B. Socubus 



                      http://eglobiotraining.com/

Más contenido relacionado

La actualidad más candente

Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1Ilivecoding.tv
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl TranslatorCma Mohd
 
Fundamentals of programming final santos
Fundamentals of programming final santosFundamentals of programming final santos
Fundamentals of programming final santosAbie Santos
 
Cis 1403 lab5_loops
Cis 1403 lab5_loopsCis 1403 lab5_loops
Cis 1403 lab5_loopsHamad Odhabi
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingHamad Odhabi
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming LanguagesMuhammad Hammad Waseem
 
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of ProgrammingMuhammad Hammad Waseem
 
[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++Muhammad Hammad Waseem
 
Planning to computer program(southeast university)
Planning to computer program(southeast university)Planning to computer program(southeast university)
Planning to computer program(southeast university)Arup deb nath
 
Compiler Design(Nanthu)
Compiler Design(Nanthu)Compiler Design(Nanthu)
Compiler Design(Nanthu)guest91cc85
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi pptmark-asoi
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2REHAN IJAZ
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language TranslatorRanjeet Kumar
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functionsray143eddie
 
Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).JayminSuhagiya
 
Types of errors
Types of errorsTypes of errors
Types of errorsRiya Josh
 

La actualidad más candente (20)

Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1ILearn Programming with Livecoding.tv http://goo.gl/tIgO1I
Learn Programming with Livecoding.tv http://goo.gl/tIgO1I
 
Basic programming
Basic programmingBasic programming
Basic programming
 
La 5 Pl Translator
La 5   Pl TranslatorLa 5   Pl Translator
La 5 Pl Translator
 
Fundamentals of programming final santos
Fundamentals of programming final santosFundamentals of programming final santos
Fundamentals of programming final santos
 
Cis 1403 lab5_loops
Cis 1403 lab5_loopsCis 1403 lab5_loops
Cis 1403 lab5_loops
 
Cis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programmingCis 1403 lab1- the process of programming
Cis 1403 lab1- the process of programming
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
 
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
[ITP - Lecture 02] Steps to Create Program & Approaches of Programming
 
Presentation
PresentationPresentation
Presentation
 
[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++[ITP - Lecture 03] Introduction to C/C++
[ITP - Lecture 03] Introduction to C/C++
 
Planning to computer program(southeast university)
Planning to computer program(southeast university)Planning to computer program(southeast university)
Planning to computer program(southeast university)
 
Compiler Design(Nanthu)
Compiler Design(Nanthu)Compiler Design(Nanthu)
Compiler Design(Nanthu)
 
LANGUAGE TRANSLATOR
LANGUAGE TRANSLATORLANGUAGE TRANSLATOR
LANGUAGE TRANSLATOR
 
Mark asoi ppt
Mark asoi pptMark asoi ppt
Mark asoi ppt
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2
 
Computer Language Translator
Computer Language TranslatorComputer Language Translator
Computer Language Translator
 
270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions270 1 c_intro_up_to_functions
270 1 c_intro_up_to_functions
 
Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).Translators(compiler assembler interpretor).
Translators(compiler assembler interpretor).
 
C programming
C programming C programming
C programming
 
Types of errors
Types of errorsTypes of errors
Types of errors
 

Similar a Project

Final requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary ClemenceFinal requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary Clemenceclemencebonifacio
 
Fundamentals of programming final
Fundamentals of programming finalFundamentals of programming final
Fundamentals of programming finalRicky Recto
 
Looping and switch cases
Looping and switch casesLooping and switch cases
Looping and switch casesMeoRamos
 
Switch case and looping statement
Switch case and looping statementSwitch case and looping statement
Switch case and looping statement_jenica
 
Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!olracoatalub
 
Deguzmanpresentationprogramming
DeguzmanpresentationprogrammingDeguzmanpresentationprogramming
Deguzmanpresentationprogrammingdeguzmantrisha
 
My programming final proj. (1)
My programming final proj. (1)My programming final proj. (1)
My programming final proj. (1)aeden_brines
 
Fundamentals of programming finals.ajang
Fundamentals of programming finals.ajangFundamentals of programming finals.ajang
Fundamentals of programming finals.ajangJaricka Angelyd Marquez
 
Unit 3.1 Algorithm and Flowchart
Unit 3.1 Algorithm and FlowchartUnit 3.1 Algorithm and Flowchart
Unit 3.1 Algorithm and FlowchartBom Khati
 
Fundamentals of programming
Fundamentals of programmingFundamentals of programming
Fundamentals of programmingKaycee Parcon
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)nharsh2308
 
4 coding from algorithms
4 coding from algorithms4 coding from algorithms
4 coding from algorithmshccit
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and developmentAli Raza
 

Similar a Project (20)

Final requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary ClemenceFinal requirement for programming-Bonifacio, Mary Clemence
Final requirement for programming-Bonifacio, Mary Clemence
 
Fundamentals of programming final
Fundamentals of programming finalFundamentals of programming final
Fundamentals of programming final
 
Switch case looping
Switch case loopingSwitch case looping
Switch case looping
 
Survelaine murillo ppt
Survelaine murillo pptSurvelaine murillo ppt
Survelaine murillo ppt
 
Looping and switch cases
Looping and switch casesLooping and switch cases
Looping and switch cases
 
Switch case and looping statement
Switch case and looping statementSwitch case and looping statement
Switch case and looping statement
 
Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!Yeahhhh the final requirement!!!
Yeahhhh the final requirement!!!
 
Deguzmanpresentationprogramming
DeguzmanpresentationprogrammingDeguzmanpresentationprogramming
Deguzmanpresentationprogramming
 
My final requirement
My final requirementMy final requirement
My final requirement
 
How a Compiler Works ?
How a Compiler Works ?How a Compiler Works ?
How a Compiler Works ?
 
My programming final proj. (1)
My programming final proj. (1)My programming final proj. (1)
My programming final proj. (1)
 
Computer
ComputerComputer
Computer
 
Fundamentals of programming finals.ajang
Fundamentals of programming finals.ajangFundamentals of programming finals.ajang
Fundamentals of programming finals.ajang
 
Unit 3.1 Algorithm and Flowchart
Unit 3.1 Algorithm and FlowchartUnit 3.1 Algorithm and Flowchart
Unit 3.1 Algorithm and Flowchart
 
Fundamentals of programming
Fundamentals of programmingFundamentals of programming
Fundamentals of programming
 
C programming
C programmingC programming
C programming
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
4 coding from algorithms
4 coding from algorithms4 coding from algorithms
4 coding from algorithms
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
Translators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreterTranslators(Compiler, Assembler) and interpreter
Translators(Compiler, Assembler) and interpreter
 

Project

  • 1. Project in Fundamental Programming By: Eunice B. Socubus BM10203 http://eglobiotraining.com/
  • 2. Looping Statement & Switch Case http://eglobiotraining.com/
  • 3. Table Of Content:  Programming  Looping For While Do while  Switch Case If Else Then http://eglobiotraining.com/
  • 4. Programming  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.  The earliest programming languages predate the invention of the computer, and were used to direct the behavior of machines such as Jacquard looms and player pianos citation needed]. Thousands of different programming languages have been created, mainly in the computer field, with many more being created every year. Most programming languages describe computation in an imperative style, i.e., as a sequence of commands, although some languages, such as those that support functional programming or logic programming, use alternative forms of description.  The description of a programming language is usually split into the two components of Syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages, such as Perl 5 and earlier, have a dominant implementation that is used as a reference. http://eglobiotraining.com/
  • 5. A programming language is a notation for writing programs, which are specifications of a computation or algorithm. Some, but not all, authors restrict the term "programming language" to those languages that can express all possible algorithms. Traits often considered important for what constitutes a programming language include:  Function and target: 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. For example PostScript programs are frequently created by another program to control a computer printer or display. More generally, a programming language may describe computation on some, possibly abstract, machine. It is generally accepted that a complete specification for a programming language includes a description, possibly idealized, of a machine or processor for that language. In most practical contexts, a programming language involves a computer; consequently, programming languages are usually defined and studied this way. Programming languages differ from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to communicate instructions to machines.  Abstractions: Programming languages usually contain abstractions for defining and manipulating data structures or controlling the flow of execution. The practical necessity that a programming language support adequate abstractions is expressed by the abstraction principle; this principle is sometimes formulated as recommendation to the programmer to make proper use of such abstractions.  Expressive power: The theory of computation classifies languages by the computations they are capable of expressing. All Turing complete languages can implement the same set of algorithms. ANSI/ISO SQL and Charity are examples of languages that are not Turing complete, yet often called programming languages. http://eglobiotraining.com/
  • 6. Looping Statements  Loops are used to repeat a block of code in programming. Being able to have your program repeatedly execute a block of code is one of the most basic but useful tasks in programming. There are three types of Looping Statement, These are:  For  While  Do while http://eglobiotraining.com/
  • 7. For Loop Statement  Terminates the loop or switch statement and transfers execution to the statement immediately following the loop or switch. http://eglobiotraining.com/
  • 8. While Loop Statement  Repeats a statement or group of statements until a given condition is true. It tests the condition before executing the loop body. http://eglobiotraining.com/
  • 9. Do…While Loop Statement  Like a while statement, except that it tests the condition at the end of the loop body. http://eglobiotraining.com/
  • 10. Switch Case Statement • In programming, 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. http://eglobiotraining.com/
  • 11. Sample Programs http://eglobiotraining.com/
  • 12. Codes & Outputs in Switch Case http://eglobiotraining.com/
  • 13. This Program uses a Switch Case Statement so that the user will have a choice. It contains days, each days have a own number to know where do they belong. http://eglobiotraining.com/
  • 14. When you run the program, this will be the sample output. The Program wants you to give a number and then it will give you the Day. http://eglobiotraining.com/
  • 15. This program is a Grading System, it Converts percent into average. http://eglobiotraining.com/
  • 16. When you run the program, this is the sample output. The conversion is shown in the box. http://eglobiotraining.com/
  • 17. This program is use for ATM machines, it computes Credit Limit and Total Purchased. http://eglobiotraining.com/
  • 18. This output shown the Computation and the remaining credit. http://eglobiotraining.com/
  • 19. This program is for reservation of seats and it will compute the total price of the reservation. http://eglobiotraining.com/
  • 20. Here is the output of the program, it contains how the reservation is done, the price and the Total Sale. http://eglobiotraining.com/
  • 21. You will just type what numbers you like most and letters in this Program. http://eglobiotraining.com/
  • 22. In this output, when you choose a number And letter it will simply reply. http://eglobiotraining.com/
  • 23. Codes & Outputs in Looping Statement http://eglobiotraining.com/
  • 24. This program uses Looping Statement, this program show the Rows and columns. http://eglobiotraining.com/
  • 25. You will just simply input number of rows and columns, the program will automatically show the output. http://eglobiotraining.com/
  • 26. In this program, I just use DO and While. http://eglobiotraining.com/
  • 27. The output shows numbers 10 up to 99 in order http://eglobiotraining.com/
  • 28. I use For Statement so that the program will loop. http://eglobiotraining.com/
  • 29. The output is this, when you input a number, it will show the number, square, and cube. http://eglobiotraining.com/
  • 30. This program will compute the Total Sales of the Number of Seats and Price. http://eglobiotraining.com/
  • 31. This is where you will see the computation and how the program run. http://eglobiotraining.com/
  • 32. This code is just simply display numbers 0 to 8. http://eglobiotraining.com/
  • 33. This is the sample output of the program. http://eglobiotraining.com/
  • 34.  Slideshare.net   Account: socubus0527  http://www.slideshare.net/recto1136 9121/fundamentals-of-programming- final  http://eglobiotraining.com/
  • 35. In partial fulfillment of requirements in Fundamental Programming Submitted to: Prof. Erwin Globio http://eglobiotraining.com/ Submitted by: Eunice B. Socubus  http://eglobiotraining.com/