Calculating The Area Of Triangle Using Javascript - Gists · GitHub

Skip to content Search Gists Search Gists All gists Back to GitHub Sign in Sign up Sign in Sign up Dismiss alert {{ message }}

Instantly share code, notes, and snippets.

@otopxy1 otopxy1/Area of a triangle.html Last active November 18, 2018 13:35 Show Gist options
  • Star (0) You must be signed in to star a gist
  • Fork (0) You must be signed in to fork a gist
  • Embed Select an option
    • Embed Embed this gist in your website.
    • Share Copy sharable link for this gist.
    • Clone via HTTPS Clone using the web URL.

    No results found

    Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/otopxy1/e4ee3eb9974338dab6b6e01f1700b226.js"></script>
  • Save otopxy1/e4ee3eb9974338dab6b6e01f1700b226 to your computer and use it in GitHub Desktop.
Code Revisions 2 Embed Select an option
  • Embed Embed this gist in your website.
  • Share Copy sharable link for this gist.
  • Clone via HTTPS Clone using the web URL.

No results found

Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/otopxy1/e4ee3eb9974338dab6b6e01f1700b226.js"></script> Save otopxy1/e4ee3eb9974338dab6b6e01f1700b226 to your computer and use it in GitHub Desktop. Download ZIP Calculating the area of triangle using javascript Raw Area of a triangle.html 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 Show hidden characters
<!DOCTYPE html>
<html>
<body>
<script>
var b,h,area;
b= parseFloat(prompt("enter base"));
h =parseFloat(prompt("enter height"));
area = (0.5*b)*h;
document.write('base is:' +b+ '<br>');
document.write('height is:' +h+ '<br>');
document.write('Area of this triangle is:' +area);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment You can’t perform that action at this time.

Tag » Area Of Triangle Javascript Code