Skip to main content

Posts

Showing posts with the label Write a C program to enter length and breadth of a rectangle and find its area.

ads1

C language tutorial

 Write a C program to enter length and breadth of a rectangle and find its area.   #include<stdio.h> #include<conio.h> void main() {     clrscr();     int area,length=10,width=5;     area = length*width;     printf("The area of a rectangle is :- %d",area); getch(); } Output :-  #include<stdio.h> #include<conio.h> void main()   {     clrscr();     int length,breadth,area;     printf("Enter the length and breadth of rectangle :-");     scanf("%d %d",&length,&breadth);     area = length * breadth;     printf("The area of rectangle is :- %d",area); getch(); } Output :-                   

ads2