User:Shridhar Paudel/Lesson Plan 4

From ICTED-WIKI
Revision as of 10:47, 9 February 2024 by Shridhar Paudel (talk | contribs) (Created page with "{| class="wikitable" |Subject: Programming in C |Date: 2080/10/26 |- |Class: BICTE |Period: 2<sup>nd</sup> |- |Semester: 1<sup>st</sup> |Time: 10 minutes |- |Topic: Looping in C using ''while'' | |} = Specific Objectives: = At the end of this topic the students will be able to: a)   Understand the syntax of ''while'' loop b)   Use of ''while'' loop statement in suitable situation = Teaching Materials: = Whiteboard, Marker, Computer = Teaching Learning Activities:...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Subject: Programming in C Date: 2080/10/26
Class: BICTE Period: 2nd
Semester: 1st Time: 10 minutes
Topic: Looping in C using while

Specific Objectives:

At the end of this topic the students will be able to:

a)   Understand the syntax of while loop

b)   Use of while loop statement in suitable situation

Teaching Materials:

Whiteboard, Marker, Computer

Teaching Learning Activities:

a)   At first, I will revise the topic which was taught last day within one minute.

b)   Then I will give the concept of while loop statement with syntax:

Syntax:       while(condition)

                   {

                   Block of statement;

                   Increment/decrement;

                   }

       

c)    I will solve the following program and make students more clear.

Example: Write program in C that display the first 20 natural numbers using while loop.

                  #include<stdio.h>

                  #include<conio.h>

                  void main()

                  {

                  int c=1;

                  while(c<=20)

                  {

                  printf(“%d\n”,c);

                  c++;

                  }

                  getch();

                  }

Evaluation:

If you declare the initial value of c as 10, then what will be the output?