This code uses conditional statements to find and print the greatest of three user-inputted numbers. It prompts the user to enter values for variables a, b, and c. It then compares the values using "if" statements to determine if a is greater than both b and c, if b is greater than both a and c, or if c is greater than both a and b. The code prints the corresponding message for the greatest number.
This code uses conditional statements to find and print the greatest of three user-inputted numbers. It prompts the user to enter values for variables a, b, and c. It then compares the values using "if" statements to determine if a is greater than both b and c, if b is greater than both a and c, or if c is greater than both a and b. The code prints the corresponding message for the greatest number.
This code uses conditional statements to find and print the greatest of three user-inputted numbers. It prompts the user to enter values for variables a, b, and c. It then compares the values using "if" statements to determine if a is greater than both b and c, if b is greater than both a and c, or if c is greater than both a and b. The code prints the corresponding message for the greatest number.
This code uses conditional statements to find and print the greatest of three user-inputted numbers. It prompts the user to enter values for variables a, b, and c. It then compares the values using "if" statements to determine if a is greater than both b and c, if b is greater than both a and c, or if c is greater than both a and b. The code prints the corresponding message for the greatest number.
Download as DOCX, PDF, TXT or read online from Scribd
Download as docx, pdf, or txt
You are on page 1of 1
W.A.
P FOR FINDING GRATEST BETWEEN
THREE NUMBER #include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("Enter the values of a&b&c"); scanf("%d%d%d",&a,&b,&c); if(a>b&&a>c) { printf("a is greater than both b&c"); } if(b>a&&b>c) { printf("b is greater than both a&c"); } else { printf("c is greater than both b&a"); } getch(); }