This document summarizes a computer class lesson on operators in the C language. It introduces different types of operators used in C like arithmetic, assignment, relational, and logical operators. It provides examples of arithmetic operators and their uses. Students are given activities to write programs that use arithmetic operators to calculate the sum, product, and average of numbers as well as the volume of a cube. The lesson evaluates expressions and assigns homework on arithmetic operators and a program to calculate the area of a rectangle.
1 of 15
Download to read offline
More Related Content
model lesson plan class 10th computer
1. Model Lesson
Computer
Class 10th
Chapter No.3
Date__24-9-2020___ Class: __10th__
Teacher Name _Mrs. Samreen Shabbir____
Subject: __Computer___
Time: __40 min__
FG Public School No. 1 (Girls), Bahawalpur
Cantt.
4. OPERATORS OF C LANGUAGE
? Expressions consist of constants and
variables combined together with
operators. An operator is a symbol used to
command the computer to perform a
certain mathematical or logical operation.
Operators are used to operate on data and
variables.
?
5. Types of operators
? The following types of operators are
commonly used in C language.
? Arithmetic operators
? Assignment operators
? Relational operators
? Logical operators
? Increment and decrement operators
6. ARITHMETIC OPERATORS
? Arithmetic operators are used to perform
arithmetic operations that include
addition, subtraction, multiplication,
division and also to find the remainder
obtained when an integer is divided by
another integer.
10. Activity
? Write a program
that reads three
numbers and prints
their sum, product
and average.
11. Activity
? Write a program
that reads the
length of one side
of a cube and prints
its volume.
12. Activity (Assessment 1)
? What will be the output of the following program?
? # include <stdio.h>
? void main(void)
? {
? int b;
? float a,c,d,e,f;
? a=14.84;
? b=7;
? c=a-b;
? printf(¡°nc=%f¡±,c);
? d=a/b;
? printf(¡°nd=%f¡±,d);
? e=a-b*3;
? printf(¡°ne=%f¡±,e);
? f=(a+b)/2;
? printf(¡°nf=%f¡±,f);
13. Activity (Assessment 2)
? Evaluate the following
expressions.
? a) 7+5*(3+4)
? b) 100/10/4
? c) 50%13%3
? d) 30/7*3-6
14. Home Work
Extensive Questions
Describe the functions of the
Arithmetic operators
Write a program that reads the
length and width
of a rectangle and prints its area.