User:Rakesh Agrahari/Lesson Plan 3

Subject : Programming with C Class: BICT 1rd Semester
Period: First Unit: One
Topic: Using Function in C Time: 10 min

SPECIFIC OBJECTIVES[edit | edit source]

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

  • Write a program in C using function with returning value with passing arguments.

TEACHING MATERIALS[edit | edit source]

  • Daily materials
  • White Board
  • Marker
  • Computer for practical work

TEACHING LEARNING ACTIVITIES[edit | edit source]

1.    First i will revise as well as write the topic on the board which was taught last day.

2.    Then i will modify that program and let students understand the new program returning value as well as passing arguments

#include<stdio.h>

#include<conio.h>

int si(int,int,int); // declaring a function

void main()

{

int p=1000,t=24,r=12;

printf("Enter principal, time and rate");

scanf("%d %d %d",&p,&t,&r);

printf("The simple interest is %d",si()); // calling a function.

}

int si(p,t,r)

{

int s=(p*t*r)/100;

return s;

}

EVALUATION[edit | edit source][edit | edit source]

  • Any Replace of this statement [printf("The simple interest is %d",si());]