Lecture15

Lecture15 - CNIT 155 Lecture15 Selection in C Announcements...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
CNIT 155 Lecture15 Selection in C#
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Midterm TR March 8th, Check the BB Lab06  is posted About the template Make sure to follow the steps in Chap02 Add a frmMain.cs code file Add a frmMain.Designer.cs We want to separate the code for the GUI from the  code for the logic that you will be typing. Announcements
Background image of page 2
Relational Operators If statement If / else Nested if  If/ else if Logical operators Objectives
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
if (condition) statement; If there are more than one statement, the group of statement should be place between {…}, to create a block of code. if (condition) { statement; statement; If statement
Background image of page 4
If the temperature is above 120, display shut off the power. Display the temperature in the textbox.    int temp; temp = int.parse(txtTemp.Text); if (temp > 120) { Messagebox.Show(“Shut off the power.”); } txtOutput.Text = temp.ToString(); Example:  
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Display you passed if score >= 70, and you failed
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 22

Lecture15 - CNIT 155 Lecture15 Selection in C Announcements...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online