/* Write a C program that performs the '@@' operation on a variety of combinations of numbers input by the user. The '@@' operation is defined as follows: a @@ b = (a*a + 2*b) / (3*a*b + 2*(a-b)) Have the user enter two doubles called X and Y and perform the '@@' operation on the following combinations of X, Y, and 1: X @@ 1 X @@ X X @@ Y Y @@ 1 Y @@ Y Y @@ X Remarks: Please replicate the exact text of the prompts and the output. Make sure the results of the '@@' operation are printed with two digits of precision (i.e., "%.2f" in printf). Even though the text must be the same, the numbers will be different depending on the user input. Important Note: The '@@' operator is ficticious and is not a native C operator. Also, it is not a valid character in the name of a variable or function. ============= START OF SAMPLE RUN ======================= Input X: 2.5 Input Y: 2.0 The results of '@@' operation: X @@ 1 = 0.79 X @@ X = 0.60 X @@ Y = 0.64 Y @@ 1 = 0.75 Y @@ Y = 0.67 Y @@ X = 0.64 ============= END OF SAMPLE RUN ======================= */ #include #include void atOperation(double a, double b, char aChar, char bChar) { double result = (a*a + 2*b) / (3*a*b + 2*(a-b)); printf("%c @@ %c = %.2f\n", aChar, bChar, result); } int main(int argc, const char *argv[]) { double X, Y; printf("Input X: "); scanf("%lf", &X); printf("Input Y: "); scanf("%lf", &Y); printf("\nThe results of the '@@' operation are:\n\n"); atOperation(X, 1, 'X', '1'); atOperation(X, X, 'X', 'X'); atOperation(X, Y, 'X', 'Y'); printf("\n"); atOperation(Y, 1, 'Y', '1'); atOperation(Y, Y, 'Y', 'Y'); atOperation(Y, X, 'Y', 'X'); system("pause"); return 0; }