Lab-report-revised-1
Lab-report-revised-1
1. Title
2. Objective(s)
3. Problem Analysis
4. Coding
5. Output (compilation, debugging & testing)
6. Conclusion.
Pokhara University Faculty of Management Studies
Submitted to
BCSIT Department
Boston International College
In partial fulfillment of the requirements for the Bachelors in Computer Systems and
Information Technology
Submitted by
Name:
Registration Number:
Internal: External:
Name: Name:
Date: Date:
Signature: Signature:
___________________________ ___________________________
Title:
Write a program to display the area of rectangle.
Objective
To understand the sequential programming logic.
Problem Analysis:
Here we have to calculate the area of rectangle reading length and breadth from user. Output is to
display the area so the output parameter is identified as A. Area of rectangle is the multiplication
of its length and breadth.
Input variables Processing Output variables Necessary header
variables/calculations files/functions/macros
l(int) A=l*b A(int) stdio.h
b(int) printf()
scanf()
Coding
#include<stdio.h>
void main()
{
int l,b,A;
printf("Enter length and breadth of rectangle ");
scanf("%d%d",&l,&b);
A=l*b;
printf("Area of rectangle =%d ",A);
}
Output (compilation, debugging and Testing)
Conclusion
The program is focused on calculating Area of rectangle for the given length and breadth. Hence
the area of rectangle is calculated and displayed.