main()/* Main Function - The program start here when the executable is run */{ /* Variable Declarations */ int x; //first number float y; //second number float result; //the result to print to the screen /* Variable Initialization */ x=3; y=5; result = square_and_multiply(x,y); printf("\nThe Final Result is : %f.\n",result);}square_and_multiply()
float square_and_multiply(int a, float b)/* Given: One integer and one float, calculate the square of the first integer, Then multiply the result by the second float given. Return: Returns the Final Result*/{ int firstNumSquare; float finalResult; /* Compute first square */ firstNumSquare = a*a; /* Compute Final Result */ finalResult = firstNumSquare * b; /* Return the value */ return finalResult;}