0% found this document useful (0 votes)
2 views

AIM

The document describes the World College of Technology and Management, where the author is pursuing a Bachelor of Technology in Computer Science Engineering. It includes two programming examples in C: one for adding two numbers and another for calculating the perimeter and area of a rectangle. The code snippets demonstrate basic input and output operations in C programming.

Uploaded by

krashanu6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

AIM

The document describes the World College of Technology and Management, where the author is pursuing a Bachelor of Technology in Computer Science Engineering. It includes two programming examples in C: one for adding two numbers and another for calculating the perimeter and area of a rectangle. The code snippets demonstrate basic input and output operations in C programming.

Uploaded by

krashanu6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

World College Of Technology And Management

Is a college where I have entered to achieve


my Bachelor of technology undergraduate degree
in Computer Science Engineering branch which
is considered as on of the most trusted
platform in India and abroad
AIM:TO ADD TWO NUMBERS

#include <stdio.h>
#include <conio.h>

void main(){

clrscr();

int a,b;

printf("Enter a number:");
scanf("%d",&a);
printf("Enter a number:");
scanf("%d",&b);

printf("The sum of %d and %d is:


%d",a,b,a+b);
getch();

}
Program:TO FIND PERIMETER AND AREA OF
RECTANGLE
#include <stdio.h>
#include <conio.h>

/*To find area and perimeter of a rectangle*/

void main(){
clrscr();
/*declaration*/
int l,b,pr,ar;//l for length, b for
breadth, pr for perimeter and ar for area

//input
printf("Enter the length of the
rectangle:");
scanf("%d",&l);
printf("Enter the breadth of the
rectangle:");
scanf("%d",&b);

//perimeter

//area
ar=l*b;

//output
printf("The Perimeter of the rectangle is:
%d\n",pr);
printf("The Area of the rectangle is: %d\
n",ar)

getch();
}

You might also like