I need to calculate the area of a triangle using this formula.
What is wrong with my code?
error C2063: 'p' : not a function

#include <stdio.h>

void Area(int a, int b, int c)
{

int p = a * b * c;
int area = (p(p - a)(p - b)(p - c))/2;
printf("%d",area);

}
int main ()
{
	convert();
	system("pause");

  return 0;
}

Line 7

int area = (p(p - a)(p - b)(p - c))/2;

should probably be

int area = (p * (p - a) * (p - b) * (p - c))/2;

also line 13 your calling

convert();

You haven't defined a function convert.

Thanks for your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.