C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <math.h>
float answer (int a, int b);
int main() {
int a,b;
float c;
char try;
do {
printf("Assign value to side a : ");
scanf("%d", &a);
printf("\nAssign value to side b : ");
scanf("%d", &b);
c = answer(a,b);
printf("\nValue of side c is equal to %4.2f", c);
printf("\nWould you like to try again? Y/N\n");
getchar();
scanf("%c", &try);
}
while (try != 'N' && try != 'n');
return 0;
}
float answer(int a,int b){
int squarea, squareb, squarec;
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run