Created
January 20, 2019 13:34
-
-
Save uysalserkan/d0bceabd841986a578764fdbbc200258 to your computer and use it in GitHub Desktop.
The program find the are of the equilateral triangle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <math.h> | |
using namespace std; | |
double area(double); | |
int main(){ | |
double x1; | |
cout <<"Please enter one side dimesion: "; | |
cin>>x1; | |
cout <<"Your area is: "<<area(x1)<<endl; | |
system("pause"); | |
} | |
double area(double dimesion){ | |
double area; | |
area = dimesion*dimesion*sqrt(3)/4; | |
return area; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment