#include #include float triangolo(float x, float x1, float x2, float xc) { if ( ( xc < x1 ) || ( xc > x2 ) ) { printf("xc (=%f) deve esse compreso fra x1 e x2\n", xc); return 0.; } printf("Bene, ora cominciamo a fare i conti\n"); return 0.; } int main() { float x1=0, x2=10, xc=11; float y; y = triangolo(5.0, x1, x2, xc); printf("y = %.f\n", y); }