1 of 15

Conditions & Loops

(Week 3)

Name: Sheikh Thanbir Alam

Deg: Senior Software Programmer

Org: Army War Game Center, BD Army

2 of 15

Suggested IDE for C#

  1. Visual Studio (Desktop/Laptop→Click to download)
  2. Try Dot Net (Web→Click to view)
  3. Dot Net Fiddle (Web→Click to view)

3 of 15

If Condition

4 of 15

IF → ELSE; IF → ELSE IF → ElSE

5 of 15

Switch Case

6 of 15

Practice

  1. Take an integer number as input
  2. Check it with a condition that is it bigger than 55 or not?

7 of 15

Loop

8 of 15

Loops in Programming

Why we need loop in programming?

Types of Loop:

  1. For
  2. Foreach
  3. While
  4. Do-While

9 of 15

10 of 15

Practice

  1. Print your name 5 times with while loop.
  2. Print your friends name 9 times with while loop.
  3. Print 1 - 20 with while loop. (H.W)

11 of 15

12 of 15

For Loop

13 of 15

Practice

  1. Print your name 5 times with for loop.
  2. Print your friends name 9 times with for loop.
  3. Print 1 - 20 with for loop. (H.W)

14 of 15

For Each Loop

15 of 15