/* C Program to Calculate Square, Square root, Triangle Perimeter and Grade Average */

#include<stdio.h>

#include<math.h>

int Calculate_Square (int Number);

float Calculate_Perimeter_Triangle (float a, float b, float c);

float Calculate_Grade (float grade1, float grade2, float grade3,

float grade4);

int

main ()

{

int number, Square;

float a, b, c, Triangle, Square_Root;

float grade1, grade2, grade3, grade4, Grade;

printf (" \n Please Enter any integer Value : ");

scanf ("%d", &number);

Square = Calculate_Square (number);

printf ("\n Square of a given number %d = %d\n", number, Square);

/* Square Root */

printf ("The square root of your number %d is %f\n", number, sqrt (number));

printf ("\nPlease Enter three sides of triangle\n");

scanf ("%f%f%f", &a, &b, &c);

printf ("Enter 4 grade values for your course:\n");

scanf ("%f%f%f%f", &grade1, &grade2, &grade3, &grade4);

Grade = Calculate_Grade (grade1, grade2, grade3, grade4);

printf ("Your grade average is %f\n", Grade);

/* Triangle */

Triangle = Calculate_Perimeter_Triangle (a, b, c);

printf ("Area of triangle is %f\n", Triangle);

return 0;

}

int

Calculate_Square (int Number)

{

return Number * Number;

}

float

Calculate_Perimeter_Triangle (float a, float b, float c)

{

float s, Perimeter;

Perimeter = a + b + c;

return Perimeter;

}

float

Calculate_Grade (float g1, float g2, float g3, float g4){

}