Conditional
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Conditional

on

  • 316 views

 

Statistics

Views

Total Views
316
Views on SlideShare
316
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Conditional Presentation Transcript

  • 1. ComputerProgram
    Lic. Catalina Arambula
  • 2. int L, R;
    Console.writeline (“Captura un valor del lador de un rectanguloparamostrarte el perimetro”);
    L=console.redline ();
    R=L*L;
    Console.writeline (“El perimetroes: “, R);
    Console C #
  • 3. Int L, r;
    L=convert.toInt(textbox1.text);
    r=L*L*L*L;
    Textbox2.text=r;
    Lineal
  • 4. CONDITIONAL
  • 5. Simple Conditional(Ifthen)
    Condition
    T
    Action 1
    F
  • 6. If the student had 10 average, then, obtain diploma.
    Simple conditional
    Start
    Average
    Average=
    10
    T
    Diploma
    F
    End
  • 7. CASE (SELECTOR MÚLTIPLE)
    1
    4
    Selector
    2
    3
    Action 1
    :
    Action N
    Action 1
    :
    Action N
    Action 1
    :
    Action N
    Action 1
    :
    Action N
  • 8. CASE (SELECTOR MÚLTIPLE)
    1
    4
    Selector
    2
    3
    T= a + b
    T= a / b
    T= a - b
    T= a * b
    T
  • 9. Start
    Type two values
    START
    SHOW “Type a mathematical operator to selection: + for addition, / for divisions, - for subtraction and * for multiplication.”
    READ Selector
    CASE 1 DO T= a + b
    CASE 2 DO T= a / b
    CASE 3 DO T= a - b
    CASE 4 DO T= a * b
    END CASE
    SHOW T
    END
    a, b
    +
    *
    Selector
    Type a mathematical operator to select: + for addition, / for division, - for subtraction, * for multiplication
    -
    /
    T= a + b
    T= a / b
    T= a - b
    T= a * b
    T
    End
  • 10. Enter a value:
    Enter b value:
    Enter a symbol to select a operation
    + for addition
    / division
    - subtraction
    * multiplication
    Total
  • 11. Switch (selector)
    {
    CASE * : T=a+b;
    Messagbox.Show ( “Total: “ T );
    Break;
    CASE /: T=a/b;
    Messagbox.Show( “Total: “ T );
    Break;
    CASE - : T=a-b;
    Messagbox.Show( “Total: “ T );
    Break;
    CASE * : T=a*b;
    Messagbox.Show( “Total: “ T );
    Break;
    Default:
    Messagbox.Show(“options invalid”);
    Break;
    }
    • Double a, b, T ;
    • 12. String selector;
    • 13. a= convert. ToDouble (textbox1.Text);
    • 14. b=convert.ToDouble(Textbox2.Text);
    • 15. Selector=TextBox3.Text);