Code:
float leg1 = -1.0, leg2 = -1.0, hypotenuse = -1.0, area = 0;
case '1' :
44 {
45 printf("Enter leg1: ");
46 scanf("%f", &leg1);
47 while(leg1 <= 0)
48 {
49 printf("Please enter a positive number: ");
50 scanf("%f", &leg1);
51 }
52 }
53 break;
Menu Printing Function;
219 void printMenu()
220
221 {
222
223
224 printf("Input value for leg1:",case '1');
225 printf("Input value for leg2:");
226 printf("Input value for hypotenuse:");
227 printf("Calculate leg1:");
228 printf("Calculate leg2:");
229 printf("Calculate hypotenuse:");
230 printf("Calculate area of right triangle:");
214 }
215
What do you mean by that?