Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

C/C++: Calculer la surface d’un triangle

 calcul
{filelink=14160}

#include <stdio.h>
 
double triangle(double largeur, double hauteur)
{
    double surface;
 
    surface = largeur * hauteur / 2.0;
 
	return surface;
}
 
int main()
{
    printf("Triangle %f", triangle(1.3, 8.3));
    return 0;
}

No comments yet.

Leave a Comment