diff --git a/Calculators/Area_Calculator/README.md b/Calculators/Area_Calculator/README.md new file mode 100644 index 00000000..4edb673e --- /dev/null +++ b/Calculators/Area_Calculator/README.md @@ -0,0 +1,31 @@ +

Area Calculator

+ + + + +

Functionalities :-

+- Calculate the area of rectangle,circle and square + + + +

Area :-

+area of rectangle = length * breadth +area of circle = 3.14 *(radius)^2 +area of square = side^2 + + + +

Inputs :-

+-Take length,breadth,radius and side as an input in metres + + + +

Built With :-

+- Html, Css, Javascript + + + +

Screenshot :-

+ + +![image](https://user-images.githubusercontent.com/88235823/167483881-bc2d9094-a8bc-4f56-b26b-9e4be040b31c.png) \ No newline at end of file diff --git a/Calculators/Area_Calculator/area.css b/Calculators/Area_Calculator/area.css new file mode 100644 index 00000000..f8b62533 --- /dev/null +++ b/Calculators/Area_Calculator/area.css @@ -0,0 +1,55 @@ +body { + display: grid; + justify-content: center; + text-align: center; + height: 100vh; + + background: #222; + font-family: 'Roboto', sans-serif; + background-image: url('https://source.unsplash.com/1600x900/?landscape'); + font-size: 100%; +} +h1{ + background: #000000d0; + text-align: center; + color: white; +} +.area{ + background: #000000d0; + padding: 1em; + border-radius: 30px; + color: white; + width: 100%; + max-width: 320px; + margin: 20px; +} + +button{ + margin: 0.4em; + border-radius: 50%; + border: none; + height: 50px; + width: 50px; + outline: none; + background: #7c7; + color: white; + cursor: pointer; + transition: 0.2s; + text-align: center; +} +input{ + border: none; + outline: none; + padding: 0.4em 1em; + border-radius:15px; + background: #7c7c7c2b; + color: white; + font-family: inherit; + font-size: 100%; + width: calc(100%-100px); +} +button:hover{ + background: #7c7c7c6b; +} + + diff --git a/Calculators/Area_Calculator/index.js b/Calculators/Area_Calculator/index.js new file mode 100644 index 00000000..fad841f9 --- /dev/null +++ b/Calculators/Area_Calculator/index.js @@ -0,0 +1,71 @@ + + +function rec(){ + var d1=document.querySelector(".len").value; +var e1=document.querySelector(".brea").value; + document.querySelector(".recans").innerHTML="Area of rectangle is " + d1*e1 +"m^2"; +} +function cir(){ + +var fg=document.querySelector(".radc").value; + document.querySelector(".cirans").innerHTML="Area of circle is " + 3.14*fg*fg+"m^2"; +} +function sq(){ + + var o=document.querySelector(".side").value; + document.querySelector(".sqans").innerHTML="Area of square is " + o*o+"m^2"; + } + function cylinder(){ + var dy=document.querySelector(".heightcy").value; + var ey=document.querySelector(".radcy").value; + document.querySelector(".cylans").innerHTML="Area of Cylinder is " + 2*3.14*ey*(ey+ dy) +"m^2"; + } + function cone(){ + var d2=document.querySelector(".radon").value; + var e2=document.querySelector(".heighton").value; + document.querySelector(".coneans").innerHTML="Area of cone is " + 3.14*d2*(d2 + e2) +"m^2"; + } + function cube(){ + var dx=document.querySelector(".lencu").value; + + document.querySelector(".cubeans").innerHTML="Area of cube is " + 6*dx*dx+"m^2"; + } + function ellipse(){ + var d4=document.querySelector(".lenx").value; + var e4=document.querySelector(".breax").value; + document.querySelector(".ellipseans").innerHTML="Area of ellipse is " + 3.14*d4*e4 +"m^2"; + } + function hemisphere(){ +var fo=document.querySelector(".radmi").value; + + document.querySelector(".hemians").innerHTML="Area of Hemisphere is " + 3*3.14*fo*fo +"m^2"; + } + function parallelogram(){ + var d5=document.querySelector(".heightp").value; + var e5=document.querySelector(".basep").value; + document.querySelector(".paraans").innerHTML="Area of parallelogram is " + d5*e5 +"m^2"; + } + function rectangularprism(){ + var d6=document.querySelector(".lenpri").value; + var e6=document.querySelector(".breapri").value; + + var f6=document.querySelector(".heightpri").value; + document.querySelector(".recprians").innerHTML="Area of rectangularprism is " +2*( d6*e6 +e6*f6+ f6*d6) +"m^2"; + } + function sphere(){ + var fi=document.querySelector(".radsp").value; + + document.querySelector(".sphans").innerHTML="Area of sphere is " + 4*3.14*fi*fi +"m^2"; + } + function trapezium(){ + var dt=document.querySelector(".lena").value; + var et=document.querySelector(".lenb").value; + var ft=document.querySelector(".heightt").value; + var iy=(dt+et) + document.querySelector(".trapans").innerHTML="Area of trapezium is " + (0.5*iy*ft) +"m^2"; + } + function triangle(){ + var dl=document.querySelector(".heighttri").value; + var el=document.querySelector(".basetri").value; + document.querySelector(".trians").innerHTML="Area of trianglris " + 0.5*dl*el +"m^2"; + } \ No newline at end of file diff --git a/Calculators/Area_Calculator/shape.html b/Calculators/Area_Calculator/shape.html new file mode 100644 index 00000000..602257db --- /dev/null +++ b/Calculators/Area_Calculator/shape.html @@ -0,0 +1,159 @@ + + + + + + + Area Calculator + + + + + + +

Area Calculator

+ + +
+ + +
+ +

Circle

+

Radius

+
+ +
+
+ +

Cylinder

+

Height

+

Radius

+
+ + +
+
+ +

Cone

+

Radius

+

Slant height

+
+ + +
+ +
+ +

Cube

+

Length

+ +
+ +
+ +
+
+
+ +

Ellipse

+

Major axis

+

minor axis

+
+ + +
+ + +
+ +

Hemisphere

+

Radius

+ +
+ + +
+ +
+ +

Parallelogram

+

base

+

Height

+
+ + +
+ +
+ +

Rectangular-prism

+

Length

+

Breadth

+

Height

+ +
+ + +
+
+
+
+ +

Rectangle

+

Length

+

Breadth

+
+ + +
+ + +
+ +

Sphere

+

Radius

+ +
+ + +
+ + +
+ + +

Square

+

Side

+ +
+ +
+ +
+ +

Trapezium

+

Length a

+

Length b

+ +

Height

+
+ + +
+ +
+
+ +

Triangle

+

base

+

Height

+
+ +
+ +
+ + + + \ No newline at end of file diff --git a/README.md b/README.md index 7ebefa8d..6b84fb72 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,7 @@ | 41 | [VAT_Calculator](./Calculators/VAT_Calculator/) | | 42 | [Wind_Chill_Calculator](./Calculators/Wind_Chill_Calculator/) | | 43 | [Resonant frequency calculator](./Calculators/Resonant_frequency_calculator/) | +|44 | [Area calculator](./Calculators/Area_Calculator/) |

Project Maintainer ⚡