Skip to content
This repository was archived by the owner on Jul 13, 2025. It is now read-only.

Commit 473079b

Browse files
code
1 parent f7a5c54 commit 473079b

11 files changed

+80
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include<stdio.h>
2+
int main()
3+
{
4+
int L, area;
5+
L=10;
6+
7+
area= L*L;
8+
9+
printf("Area of the square=%d", area);
10+
11+
return 0;
12+
}
227 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Finding the Area of the Traiangle. Taking input from the user.
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
int L, area;
7+
printf("Enter lenght of the square L: ");
8+
scanf("%d", &L);
9+
10+
area = L*L;
11+
12+
printf("Area of the square L: %d", area);
13+
14+
return 0;
15+
}
Binary file not shown.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Finding the Area of the Traiangle. Taking input from the user.
2+
3+
#include <stdio.h>
4+
int main()
5+
{
6+
int b, h, area;
7+
printf("Please enter the base of the triangle: ");
8+
scanf("%d", &b);
9+
10+
printf("Please enter the height of the triangle: ");
11+
scanf("%d", &h);
12+
13+
area= 0.5*b*h;
14+
15+
printf("The area of the triangel= %d", area);
16+
17+
return 0;
18+
}
383 KB
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Find the Perimeter of the square. Take input from the user.
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
int L, P;
7+
printf("Enter lenght of the square L: ");
8+
scanf("%d", &L);
9+
10+
P = 4*L;
11+
12+
printf("Area of the square L: %d", P);
13+
14+
return 0;
15+
}
383 KB
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int main()
2+
[
3+
float Lenght, Perimeter;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Area of a Triangle where three sides are given.
2+
3+
#include<stdio.h>
4+
int main()
5+
{
6+
float a, b, c, s, area;
7+
printf("Enter the value of a, b, c: \n");
8+
scanf("%f %f %f", &a, &b, &c);
9+
10+
s=(a+b+c)/2;
11+
12+
area = sqrt(s*(s-a)*(s-b)*(s-c));
13+
14+
printf("Area of the Triangel= %.2lf", area);
15+
16+
return 0;
17+
}

0 commit comments

Comments
 (0)