Skip to content

Commit 0e11bad

Browse files
committed
solving 3rd problem
1 parent b7dc1d9 commit 0e11bad

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

a.out

56 Bytes
Binary file not shown.

solve_problem.c

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,34 @@
5959
// return 0;
6060
// }
6161

62-
// 👉👉 🔹Qu -3 🔹
62+
// 👉👉 🔹Qu -3 🔹 write a fuction calculate area of a square , a circle & a rectangel
6363

6464
#include <stdio.h>
65-
int main()
66-
{
65+
#include <math.h>
6766

67+
float square_f( float side);
68+
float circle_f(float rad);
69+
float rectangle_f(float a , float b);
70+
int main(){
71+
72+
float a = 4;
73+
float b = 4;
74+
printf("Total Area is : %f\n" , rectangle_f(a,b));
6875
return 0;
6976
}
7077

78+
float square_f(float side){
79+
return side * side ;
80+
}
81+
82+
float cirlce_f(float rad){
83+
return 3.1416 * rad * rad ;
84+
}
85+
86+
float rectangle_f(float a , float b){
87+
return a*b ;
88+
}
89+
7190
// #include <stdio.h>
7291
// int main(){
7392

0 commit comments

Comments
 (0)