Note carefully script the following program:
/****************************************************************************
* Name Programmers : Hendro P. Sinaga *
* File Name : broadtriangular.c *
* Preparation Program : 30 September 2010 *
* Program Objectives : Calculate the area of a triangle *
****************************************************************************/
#include
int main()
{
float wide, the base, high;
printf ("Calculate the area of triangle. \n");
printf("Give length of the base: ");
scanf("%f", &base);
printf("Give a high triangle: ");
scanf("%f", &high);
wide = (the base * high) / 2.0;
printf("Triangle area = %f\n", wide);
return 0;
}
Hopefully the script of this program is useful for gentlemen in learning to make a simple program with C language.
No comments:
Post a Comment