Question: c programming language why is it that on the output it say 1/2 =0.00 ?? how to fix it on my code?? here is my

c programming language
c programming language why is it that on the output it saywhy is it that on the output it say 1/2 =0.00 ??
how to fix it on my code??
here is my code
1/2 =0.00 ?? how to fix it on my code?? here is
my code Q X make -S ./main Please, enter your three intergers:
-3 5 1 You have entered the nmbers: -3, 5 and 1

Q X make -S ./main Please, enter your three intergers: -3 5 1 You have entered the nmbers: -3, 5 and 1 Choose one of these options: A-Print the lowest number entered. B-Print the highest number entered. C-Print whether the first number entered is an even or odd number. D-Print the division of the third number entere d by the sum of the first two numbers entered. Make your selection: d 1 divided by 2 is 0.00 Invalid selection! 8. Ginclude include I A int main() B&B8oU 10 e 11 12 13 14 15 int x, y, z; //Declared variables. Vix is the first number entered, y is the second, and z is the third int s; //5 is for the sum of x and y double R: IR is the result from the division between the third number z and the son of the first two numbers x and y x char choice; 16 17 18 19 20 21 22 23 24 printf("Please enter your three intergers: "); scanf("%d %d %d", &x, &y, &z); printf("You have entered the nmbers: d, Nid and Nd ",X, Y, z); printf(" Choose one of these options: "); printf("\t A-Print the lowest number entered. \t B-Print the highest number entered. In It C-Print whether the first number entered is an even of odd number. In It D-Print the division of the third number entered by the sum of the first two numbers entered."); ? 25 26 32 35 39 main.c x 28 printf(" Make your selection: "); 29 scanf("%c", &choice); 30 31 switch (choice) { 33 case 'a': 34 case 'A': if(xcy && xy && x>z) 48 { 49 printf("The highest number entered is 9d", x); 50 } 51 else if(y>x && y>z) { 53 printf("The highest number entered is 9d", y); 52 CA main.cx 51 else if(y>x && y>2) 52 printf("The highest number entered is %d", y); } else printf("The highest number entered is %d", 2); 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 break; case 'c': case 'C': if((x % 2 ) ==0) printf("%d is an even number", x); } else printf("%d is an odd number", *); case d': case 'D': S= (x+y); R- 2/5; // printf("Sad --R-.375", S, R): printf("%d divided by %d is %.21f", 2, S, R): default: printf(" Invalid selection!"); } printf(" Goodbye!"); return 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!