Quantcast
Channel: Forum Pasja Informatyki - Najnowsze pytania
Viewing all articles
Browse latest Browse all 65225

heron w c++ łatwy

$
0
0
#include <iostream>
#include <math.h>

using namespace std;
float Heron(float a, float b, float c)
{
    float p;
    float P;
    p=(a+b+c)/2;
    P=sqrt(p(p-a)(p-b)(p-c));
    return P;
}
int main()
{
    float a,b,c;
    cin>>a>>b>>c;
    cout<<Heron(a,b,c);
}

 

Mam taki kod i wywala mi błąd: "error: 'p' cannot be used as a function ".

Ktoś wie o co chodzi?


Viewing all articles
Browse latest Browse all 65225


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>