SlideShare a Scribd company logo
1 of 26
FUNDAMENTALS OF PROGRAMMING
           Final Examination


             Submitted to:
           Prof. Erwin Globio



             Submitted by:
        Janine Rachel F. Ramirez
              2011367621


                                For more on C++ Programs go to:
                                http://eglobiotraining.com
SWITCH CASE
   The switch statement body consists of a series
    of case labels and an optional default label. No two




                                                           http://eglobiotraining.com
                                                           For more on C++ Programs go to:
    constant expressions in case statements can
    evaluate to the same value. The default label can
    appear only once. The labeled statements are not
    syntactic requirements, but the switch statement is
    meaningless without them. The default statement
    need not come at the end; it can appear anywhere
    in the body of the switch statement. A case or
    default label can only appear inside a switch
    statement.
C++ PROGRAMMING: SWITCH CASE
EXAMPLE 1
   char ticket;


     cout<<"Please choose your ticket:n"<<endl<<"Ticket [A] - Manila to Intramuros."<<endl
     <<"Ticket [B] - Manila to City Hall."<<endl<<"Ticket [C] - Manila to Mall of Asia.n"<<endl;




                                                                                                      http://eglobiotraining.com
                                                                                                      For more on C++ Programs go to:
     cin>>ticket;


     switch (ticket)
     {
         case 'a':
             cout<<"nThe price of Ticket [A] is P 15.00. Please proceed to the cashier.n"<<endl;
             break;


         case 'b':
            cout<<"nThe price of Ticket [B] is P 12.00. Please proceed to the cashier.n"<<endl;
            break;


         case 'c':
             cout<<"nThe price of Ticket [C] is P 25.00. Please proceed to the cashier.n"<<endl;
             break;


         default:
             cout<<"You must choose a ticket to proceed."<<endl;
             }
For more on C++ Programs go to:
                               http://eglobiotraining.com
SWITCH CASE EXAMPLE 1 OUTPUT
C++ PROGRAMMING: SWITCH CASE
EXAMPLE 2
   char name;


    cout<<"Please choose a horse to bet on: Abe, Chuck or Steve."<<endl
    <<"Please enter a for Abe, b for Chuck and c for Steve.n"<<endl;




                                                                                   http://eglobiotraining.com
                                                                                   For more on C++ Programs go to:
    cin>>name;


    switch (name)
    {
        case 'a':
            cout<<"nYou choose Abe. He has a 45% chance of winning.n"<<endl;
            break;


        case 'b':
           cout<<"nYou choose Chuck. He has a 50% chance of winning.n"<<endl;
           break;


        case 'c':
           cout<<"nYou choose Steve. He has a 75% chance of winnng. n"<<endl;
           break;


        default:
            cout<<"You must choose a horse to proceed."<<endl;
            }
For more on C++ Programs go to:
                               http://eglobiotraining.com
SWITCH CASE EXAMPLE 2 OUTPUT
C++ PROGRAMMING: SWITCH CASE EXAMPLE 3
                     int equation;
                     int x, y, z;

                       cout<<"Please choose which arithmetic operation to use. 1 for
    addition, 2 for subtraction, 3 for multiplication or 4 for division.n"<<endl;
                       cin>>equation;




                                                                                        http://eglobiotraining.com
                                                                                        For more on C++ Programs go to:

     switch (equation)
     {
         case 1:
             cout<<"nPlease enter two integers: "<<endl;
             cin>>x>>y;
             z=x+y;
             cout<<"nTheir sum is: "<<z<<endl<<endl;
             break;
         case 2:
             cout<<"nPlease enter two integers: "<<endl;
             cin>>x>>y;
             z=x-y;
             cout<<"Their difference is: "<<z<<endl<<endl;
             break;
SWITCH CASE EXAMPLE 3 CONTINUATION
   case 3:
            cout<<"nPlease enter two integers: "<<endl;
            cin>>x>>y;
            z=x*y;
            cout<<"Their product is: "<<z<<endl<<endl;




                                                            http://eglobiotraining.com
                                                            For more on C++ Programs go to:
            break;
         case 4:
            cout<<"nPlease enter two integers: "<<endl;
            cin>>x>>y;
            z=x/y;
            cout<<"Their quotient is: "<<z<<endl<<endl;
            break;
         default:
              cout<<"You must choose an operation to
    proceed."<<endl;
              }
For more on C++ Programs go to:
                               http://eglobiotraining.com
SWITCH CASE EXAMPLE 3 OUTPUT
C++ PROGRAMMING: SWITCH CASE
EXAMPLE 4
   int food;


     cout<<"Please choose your dessert.n"<<endl<<"Menu:n"<<"[1] Chocolate Caken"
     <<"[2] Strawberry Caken"<<"[3] Mango Caken"<<endl;




                                                                                                 http://eglobiotraining.com
                                                                                                 For more on C++ Programs go to:
     cin>>food;


     switch (food)
     {
         case 1:
             cout<<"nThe Chocolate Cake is P210.00. Please proceed to the cashier.n"<<endl;
             break;
         case 2:
            cout<<"nThe Strawberry Case is P150.00. Please proceed to the cashier.n"<<endl;
            break;
         case 3:
               cout<<"nThe Mango Cake is P110.00. Please proceed to the cashier.n"<<endl;
               break;
         default:
                cout<<"Please choose a cake!n"<<endl;
                }
For more on C++ Programs go to:
                               http://eglobiotraining.com
SWITCH CASE EXAMPLE 4 OUTPUT
C++ PROGRAMMING: SWITCH CASE
EXAMPLE 5
   int dinner;


     cout<<"Please choose your dinner.n"<<endl<<"Menu:n"<<"[1] Sinigang na baboyn"
     <<"[2] Beef Steakn"<<"[3] Chicken Curryn"<<endl;




                                                                                                    http://eglobiotraining.com
                                                                                                    For more on C++ Programs go to:
     cin>>dinner;


     switch (dinner)
     {
         case 1:
             cout<<"nThe Sinigang na baboy is P120.00. Please proceed to the cashier.n"<<endl;
             break;
         case 2:
            cout<<"nThe Beef Steak is P150.00. Please proceed to the counter.n"<<endl;
            break;
         case 3:
             cout<<"nThe Chicken Curry is P110.00. Please proceed to the counter.n"<<endl;
             break;
         default:
                 cout<<"Please choose a cake!n"<<endl;
                 }
For more on C++ Programs go to:
                               http://eglobiotraining.com
SWITCH CASE EXAMPLE 5 OUTPUT
LOOPING STATEMENT
   a loop is a way of repeating a statement a number
    of times until some way of ending the loop occurs. It




                                                            http://eglobiotraining.com
                                                            For more on C++ Programs go to:
    might be run for a preset number of times, typically
    in a for loop, repeated as long as an expression is
    true (a while loop) or repeated until an expression
    becomes false in a do while loop.
C++ PROGRAMMING: LOOPING STATEMENT
EXAMPLE 1: FOR
   int main()
   {





                                                              http://eglobiotraining.com
                                                              For more on C++ Programs go to:
     int width, space, alignleft, count=16;
     for(width=1;width<=8;width++)
     {
        for (alignleft=width ; alignleft>=0 ; alignleft--)
        {
           cout<<" ";
        }
     for (space=1 ; space<count ; space++)
     {
        cout<<"*";
        }
     cout<<endl;
     count=count-2;
     }
For more on C++ Programs go to:
                                     http://eglobiotraining.com
LOOPING STATEMENT EXAMPLE 1 OUTPUT
C++ PROGRAMMING: LOOPING STATEMENT
EXAMPLE 2: FOR
   int x;





                                                            http://eglobiotraining.com
                                                            For more on C++ Programs go to:
     cout<<"Please enter an integer and I will countdown
    beginning from the"
     <<endl<<"integer you input.n"<<endl;
     cin>>x;
     cout<<endl;

     for (x=16; x>-1; x--)
     {
        cout<<x<<", ";
        }
     cout<<"nThis concludes my countdown.n"<<endl;
For more on C++ Programs go to:
                                     http://eglobiotraining.com
LOOPING STATEMENT EXAMPLE 2 OUTPUT
C++ PROGRAMMING: LOOPING STATEMENT
EXAMPLE 3: WHILE
   int x;

     cout<<"Please enter an integer and I will countdown




                                                              http://eglobiotraining.com
                                                              For more on C++ Programs go to:
    beginning from the"
     <<endl<<"integer you input.n"<<endl;
     cin>>x;

     cout<<endl;
     while (x>0){
         cout<<x<<", ";

        x--;
        }
     cout<<endl<<"nThis concludes my countdown.n"<<endl;
For more on C++ Programs go to:
                                     http://eglobiotraining.com
LOOPING STATEMENT EXAMPLE 3 OUTPUT
C++ PROGRAMMING: LOOPING STATEMENT
EXAMPLE 4: WHILE
   int x=4, y=3;





                                                         http://eglobiotraining.com
                                                         For more on C++ Programs go to:
    while (x>0){
          cout<<"This sentence is repeated 4
    times."<<endl;
          x--;
          }
      while (y>0){
          cout<<"While this sentence is repeated only
    3 times."<<endl;
          y--;
          }
For more on C++ Programs go to:
                                     http://eglobiotraining.com
LOOPING STATEMENT EXAMPLE 4 OUTPUT
C++ PROGRAMMING: LOOPING STATEMENT
EXAMPLE 5: DO WHILE
   int x, y, z;
   char answer;





                                                                                       http://eglobiotraining.com
                                                                                       For more on C++ Programs go to:
   do
   {
        cout<<"Please enter two integers and I will add them."<<endl;
        cin>>x>>y;

        z=x+y;

       cout<<"nThe sum of "<<x<<" and "<<y<<" is "<<z<<endl;
       cout<<"nWould you like me to add another two integers? Please answer with y
    for yes and n for no."<<endl;
   cin>>answer;
   cout<<endl;
   }
   while (answer=='y');

   cout<<"nGood bye!"<<endl;
For more on C++ Programs go to:
                                     http://eglobiotraining.com
LOOPING STATEMENT EXAMPLE 5 OUTPUT
http://eglobiotraining.com
                                                 For more on C++ Programs go to:
YOU CAN FIND THIS PRESENTATION AT MY
SLIDESHARE ACCOUNT AT:
   http://www.slideshare.net/janine_ramirez16
This Power Point presentation is created by:
             Janine Rachel F. Ramirez



 The Power Point presentation is to be submitted to:




                                                       http://eglobiotraining.com
                                                       For more on C++ Programs go to:
                Prof. Erwin Globio

              The Official Website is:
             http://eglobiotraining.com/

More Related Content

What's hot (7)

C Programming
C ProgrammingC Programming
C Programming
 
JavaScript Control Statements II
JavaScript Control Statements IIJavaScript Control Statements II
JavaScript Control Statements II
 
C if else
C if elseC if else
C if else
 
C++loop statements
C++loop statementsC++loop statements
C++loop statements
 
[C++]3 loop statement
[C++]3 loop statement[C++]3 loop statement
[C++]3 loop statement
 
Func up your code
Func up your codeFunc up your code
Func up your code
 
Mnistauto 5
Mnistauto 5Mnistauto 5
Mnistauto 5
 

Similar to Ramirez slideshow

POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAAiman Hud
 
Chp4_C++_Control Structures-Part2_Iteration.pptx
Chp4_C++_Control Structures-Part2_Iteration.pptxChp4_C++_Control Structures-Part2_Iteration.pptx
Chp4_C++_Control Structures-Part2_Iteration.pptxssuser10ed71
 
Powerpoint loop examples a
Powerpoint loop examples aPowerpoint loop examples a
Powerpoint loop examples ajaypeebala
 
Programación de C++, Función Case
Programación de C++, Función CaseProgramación de C++, Función Case
Programación de C++, Función CaseRamon Lop-Mi
 
Control Statement.ppt
Control Statement.pptControl Statement.ppt
Control Statement.pptsanjay
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.harman kaur
 
WINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptx
WINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptxWINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptx
WINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptxssusercd11c4
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALPrabhu D
 
Contoh program c++ kalkulator
Contoh program c++ kalkulatorContoh program c++ kalkulator
Contoh program c++ kalkulatorJsHomeIndustry
 
Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++Ramon Lop-Mi
 
Assignment#1
Assignment#1Assignment#1
Assignment#1NA000000
 

Similar to Ramirez slideshow (20)

Lab # 3
Lab # 3Lab # 3
Lab # 3
 
Project in programming
Project in programmingProject in programming
Project in programming
 
C++ programming
C++ programmingC++ programming
C++ programming
 
C++ TUTORIAL 1
C++ TUTORIAL 1C++ TUTORIAL 1
C++ TUTORIAL 1
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
Chp4_C++_Control Structures-Part2_Iteration.pptx
Chp4_C++_Control Structures-Part2_Iteration.pptxChp4_C++_Control Structures-Part2_Iteration.pptx
Chp4_C++_Control Structures-Part2_Iteration.pptx
 
Oop1
Oop1Oop1
Oop1
 
901131 examples
901131 examples901131 examples
901131 examples
 
lesson 2.pptx
lesson 2.pptxlesson 2.pptx
lesson 2.pptx
 
Powerpoint loop examples a
Powerpoint loop examples aPowerpoint loop examples a
Powerpoint loop examples a
 
Programación de C++, Función Case
Programación de C++, Función CaseProgramación de C++, Función Case
Programación de C++, Función Case
 
Control Statement.ppt
Control Statement.pptControl Statement.ppt
Control Statement.ppt
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.
 
WINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptx
WINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptxWINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptx
WINSEM2016-17_CSE1002_LO_1336_24-JAN-2017_RM003_session 10.pptx
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
 
neiljaysonching
neiljaysonchingneiljaysonching
neiljaysonching
 
Contoh program c++ kalkulator
Contoh program c++ kalkulatorContoh program c++ kalkulator
Contoh program c++ kalkulator
 
Macaraeg
MacaraegMacaraeg
Macaraeg
 
Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++Programa de Detección de Valor de una Resistencia de Carbón en C++
Programa de Detección de Valor de una Resistencia de Carbón en C++
 
Assignment#1
Assignment#1Assignment#1
Assignment#1
 

Ramirez slideshow

  • 1. FUNDAMENTALS OF PROGRAMMING Final Examination Submitted to: Prof. Erwin Globio Submitted by: Janine Rachel F. Ramirez 2011367621 For more on C++ Programs go to: http://eglobiotraining.com
  • 2. SWITCH CASE  The switch statement body consists of a series of case labels and an optional default label. No two http://eglobiotraining.com For more on C++ Programs go to: constant expressions in case statements can evaluate to the same value. The default label can appear only once. The labeled statements are not syntactic requirements, but the switch statement is meaningless without them. The default statement need not come at the end; it can appear anywhere in the body of the switch statement. A case or default label can only appear inside a switch statement.
  • 3. C++ PROGRAMMING: SWITCH CASE EXAMPLE 1  char ticket;   cout<<"Please choose your ticket:n"<<endl<<"Ticket [A] - Manila to Intramuros."<<endl  <<"Ticket [B] - Manila to City Hall."<<endl<<"Ticket [C] - Manila to Mall of Asia.n"<<endl; http://eglobiotraining.com For more on C++ Programs go to:  cin>>ticket;   switch (ticket)  {  case 'a':  cout<<"nThe price of Ticket [A] is P 15.00. Please proceed to the cashier.n"<<endl;  break;   case 'b':  cout<<"nThe price of Ticket [B] is P 12.00. Please proceed to the cashier.n"<<endl;  break;   case 'c':  cout<<"nThe price of Ticket [C] is P 25.00. Please proceed to the cashier.n"<<endl;  break;   default:  cout<<"You must choose a ticket to proceed."<<endl;  }
  • 4. For more on C++ Programs go to: http://eglobiotraining.com SWITCH CASE EXAMPLE 1 OUTPUT
  • 5. C++ PROGRAMMING: SWITCH CASE EXAMPLE 2  char name;   cout<<"Please choose a horse to bet on: Abe, Chuck or Steve."<<endl  <<"Please enter a for Abe, b for Chuck and c for Steve.n"<<endl; http://eglobiotraining.com For more on C++ Programs go to:  cin>>name;   switch (name)  {  case 'a':  cout<<"nYou choose Abe. He has a 45% chance of winning.n"<<endl;  break;   case 'b':  cout<<"nYou choose Chuck. He has a 50% chance of winning.n"<<endl;  break;   case 'c':  cout<<"nYou choose Steve. He has a 75% chance of winnng. n"<<endl;  break;   default:  cout<<"You must choose a horse to proceed."<<endl;  }
  • 6. For more on C++ Programs go to: http://eglobiotraining.com SWITCH CASE EXAMPLE 2 OUTPUT
  • 7. C++ PROGRAMMING: SWITCH CASE EXAMPLE 3  int equation;  int x, y, z;   cout<<"Please choose which arithmetic operation to use. 1 for addition, 2 for subtraction, 3 for multiplication or 4 for division.n"<<endl;  cin>>equation; http://eglobiotraining.com For more on C++ Programs go to:   switch (equation)  {  case 1:  cout<<"nPlease enter two integers: "<<endl;  cin>>x>>y;  z=x+y;  cout<<"nTheir sum is: "<<z<<endl<<endl;  break;  case 2:  cout<<"nPlease enter two integers: "<<endl;  cin>>x>>y;  z=x-y;  cout<<"Their difference is: "<<z<<endl<<endl;  break;
  • 8. SWITCH CASE EXAMPLE 3 CONTINUATION  case 3:  cout<<"nPlease enter two integers: "<<endl;  cin>>x>>y;  z=x*y;  cout<<"Their product is: "<<z<<endl<<endl; http://eglobiotraining.com For more on C++ Programs go to:  break;  case 4:  cout<<"nPlease enter two integers: "<<endl;  cin>>x>>y;  z=x/y;  cout<<"Their quotient is: "<<z<<endl<<endl;  break;  default:  cout<<"You must choose an operation to proceed."<<endl;  }
  • 9. For more on C++ Programs go to: http://eglobiotraining.com SWITCH CASE EXAMPLE 3 OUTPUT
  • 10. C++ PROGRAMMING: SWITCH CASE EXAMPLE 4  int food;   cout<<"Please choose your dessert.n"<<endl<<"Menu:n"<<"[1] Chocolate Caken"  <<"[2] Strawberry Caken"<<"[3] Mango Caken"<<endl; http://eglobiotraining.com For more on C++ Programs go to:  cin>>food;   switch (food)  {  case 1:  cout<<"nThe Chocolate Cake is P210.00. Please proceed to the cashier.n"<<endl;  break;  case 2:  cout<<"nThe Strawberry Case is P150.00. Please proceed to the cashier.n"<<endl;  break;  case 3:  cout<<"nThe Mango Cake is P110.00. Please proceed to the cashier.n"<<endl;  break;  default:  cout<<"Please choose a cake!n"<<endl;  }
  • 11. For more on C++ Programs go to: http://eglobiotraining.com SWITCH CASE EXAMPLE 4 OUTPUT
  • 12. C++ PROGRAMMING: SWITCH CASE EXAMPLE 5  int dinner;   cout<<"Please choose your dinner.n"<<endl<<"Menu:n"<<"[1] Sinigang na baboyn"  <<"[2] Beef Steakn"<<"[3] Chicken Curryn"<<endl; http://eglobiotraining.com For more on C++ Programs go to:  cin>>dinner;   switch (dinner)  {  case 1:  cout<<"nThe Sinigang na baboy is P120.00. Please proceed to the cashier.n"<<endl;  break;  case 2:  cout<<"nThe Beef Steak is P150.00. Please proceed to the counter.n"<<endl;  break;  case 3:  cout<<"nThe Chicken Curry is P110.00. Please proceed to the counter.n"<<endl;  break;  default:  cout<<"Please choose a cake!n"<<endl;  }
  • 13. For more on C++ Programs go to: http://eglobiotraining.com SWITCH CASE EXAMPLE 5 OUTPUT
  • 14. LOOPING STATEMENT  a loop is a way of repeating a statement a number of times until some way of ending the loop occurs. It http://eglobiotraining.com For more on C++ Programs go to: might be run for a preset number of times, typically in a for loop, repeated as long as an expression is true (a while loop) or repeated until an expression becomes false in a do while loop.
  • 15. C++ PROGRAMMING: LOOPING STATEMENT EXAMPLE 1: FOR  int main()  {  http://eglobiotraining.com For more on C++ Programs go to:  int width, space, alignleft, count=16;  for(width=1;width<=8;width++)  {  for (alignleft=width ; alignleft>=0 ; alignleft--)  {  cout<<" ";  }  for (space=1 ; space<count ; space++)  {  cout<<"*";  }  cout<<endl;  count=count-2;  }
  • 16. For more on C++ Programs go to: http://eglobiotraining.com LOOPING STATEMENT EXAMPLE 1 OUTPUT
  • 17. C++ PROGRAMMING: LOOPING STATEMENT EXAMPLE 2: FOR  int x;  http://eglobiotraining.com For more on C++ Programs go to:  cout<<"Please enter an integer and I will countdown beginning from the"  <<endl<<"integer you input.n"<<endl;  cin>>x;  cout<<endl;   for (x=16; x>-1; x--)  {  cout<<x<<", ";  }  cout<<"nThis concludes my countdown.n"<<endl;
  • 18. For more on C++ Programs go to: http://eglobiotraining.com LOOPING STATEMENT EXAMPLE 2 OUTPUT
  • 19. C++ PROGRAMMING: LOOPING STATEMENT EXAMPLE 3: WHILE  int x;   cout<<"Please enter an integer and I will countdown http://eglobiotraining.com For more on C++ Programs go to: beginning from the"  <<endl<<"integer you input.n"<<endl;  cin>>x;   cout<<endl;  while (x>0){  cout<<x<<", ";   x--;  }  cout<<endl<<"nThis concludes my countdown.n"<<endl;
  • 20. For more on C++ Programs go to: http://eglobiotraining.com LOOPING STATEMENT EXAMPLE 3 OUTPUT
  • 21. C++ PROGRAMMING: LOOPING STATEMENT EXAMPLE 4: WHILE  int x=4, y=3;  http://eglobiotraining.com For more on C++ Programs go to:  while (x>0){  cout<<"This sentence is repeated 4 times."<<endl;  x--;  }  while (y>0){  cout<<"While this sentence is repeated only 3 times."<<endl;  y--;  }
  • 22. For more on C++ Programs go to: http://eglobiotraining.com LOOPING STATEMENT EXAMPLE 4 OUTPUT
  • 23. C++ PROGRAMMING: LOOPING STATEMENT EXAMPLE 5: DO WHILE  int x, y, z;  char answer;  http://eglobiotraining.com For more on C++ Programs go to:  do  {  cout<<"Please enter two integers and I will add them."<<endl;  cin>>x>>y;   z=x+y;   cout<<"nThe sum of "<<x<<" and "<<y<<" is "<<z<<endl;  cout<<"nWould you like me to add another two integers? Please answer with y for yes and n for no."<<endl;  cin>>answer;  cout<<endl;  }  while (answer=='y');   cout<<"nGood bye!"<<endl;
  • 24. For more on C++ Programs go to: http://eglobiotraining.com LOOPING STATEMENT EXAMPLE 5 OUTPUT
  • 25. http://eglobiotraining.com For more on C++ Programs go to: YOU CAN FIND THIS PRESENTATION AT MY SLIDESHARE ACCOUNT AT:  http://www.slideshare.net/janine_ramirez16
  • 26. This Power Point presentation is created by: Janine Rachel F. Ramirez The Power Point presentation is to be submitted to: http://eglobiotraining.com For more on C++ Programs go to: Prof. Erwin Globio The Official Website is: http://eglobiotraining.com/