Results 1 to 3 of 3
  1. #1

    Default HELP! Square root operation in C


    Mga bro, naa koy problem bah.

    I have this C program and I need to perform the square root operation para sa area of a triangle using Heron's formula. Mao ning program nako ay:

    Code:
    #include<stdio.h>
    #include<conio.h>
    void main(void)
    {
     int a, b, c;
     float s, dividend, area;
     clrscr();
     printf("Enter 3 numbers separated by space for the sides of the triangle: ");
     scanf("%d %d %d", &a, &b, &c);
     s=(a+b+c)/2;
     dividend=s*(s-a)*(s-b)*(s-c);
     if (dividend<0)
      printf("The given sides do not represent a triangle");
     else
     {
      area=????????
      printf("Area of the triangle: %.2f", area);
     }
     getch();
    }
    Thanks mga Bro!
    Last edited by marcdaven; 02-21-2010 at 09:47 AM. Reason: Highlighting the problem

  2. #2

  3. #3
    Thanks BRO!

  4.    Advertisement

Similar Threads

 
  1. ~Help My Pet Is In Trouble! Need Advice~
    By bad donkey! in forum Pet Discussions
    Replies: 232
    Last Post: 11-17-2012, 08:37 AM
  2. NEED HELP: International Culinary School in Banawa
    By denis_jay in forum Food & Beverages
    Replies: 48
    Last Post: 11-09-2012, 09:44 PM
  3. Need Help About Square Root In Mathematics
    By Chipmunk888 in forum General Discussions
    Replies: 9
    Last Post: 12-13-2007, 02:06 AM
  4. guys i need help sa mga famous in guitars & effects
    By casterTroy in forum Music & Radio
    Replies: 37
    Last Post: 08-27-2007, 06:43 PM
  5. HELP! Lost my thread in Buy/Sell Section
    By pike in forum Support Center
    Replies: 2
    Last Post: 07-24-2007, 05:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top