answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

void main()

{

int a,b,c;

clrscr();

printf("enter the three numbers: ");

scanf(%d%d%d:,&a&b&c);

if(a>b | a>c)

{

printf("the greatest no: is %d",a);

}

if(b>c)

{

printf("the greatest no: is %d",b);

}

else

{

printf("the greatest no: is %d",c);

}

getch();

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


Draw a flowchart that will determine and display the largest among the three numbers being inputted?

start input A &amp; B if A&gt;B print A is greatest if B&gt;A print B is greatest stop james ola writes.....SOT.


Write a program in COBOL to find the largest of N number?

identification division. program-id. greatest. environment division. data division. working-storage section. 77 a pic 999. 77 b pic 999. 77 c pic 999. procedure division. greatest. display "ENTER THE THREE NUMBERS:". accept a. accept b. accept c. if a &gt; b and a &gt; c display a "is greatest" else if b &gt; c display b "is greatest" else display c "is greatest". display " thank you". stop run.


Give a sample problem with the use of algorithm and flowchart symbols?

design a flowchart that will input three numbers and get their sum. If the sum is greater than 20, then print "sum&gt;20",else print the sum.


C program to find the largest and smallest of three numbers using IF IF ELSE?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int a,b,c; clrscr(); printf("Enter any three numbers"); scanf("%d%d%d",&amp;a,&amp;b,&amp;c); if(a&gt;b&amp;&amp;a&gt;c) printf("A is greatest"); else if(b&gt;a&amp;&amp;a&gt;c) printf("B is greatest"); else if(c&gt;a&amp;&amp;c&gt;b) printf("C is greatest"); if(a&lt;b&amp;&amp;a&lt;c) printf("A is smallest"); else if(b&lt;a&amp;&amp;b&lt;c) printf("B is smallest"); else if(c&lt;a&amp;&amp;c&lt;b) printf("C is smallest"); getch(); }

Related Questions

C program to find greatest of three numbers?

# include&lt;stdio.h&gt; main() { int a,b,c; print f("enter the values of a,b,c"); scan f("%d%d%d",&amp;a,&amp;b,&amp;c); if((a&gt;b)&amp;&amp;(a&gt;c)) print f("Greatest value is a =%d",a); else if((b&gt;a)&amp;&amp;(b&gt;c)) print f("Greatest value is b=%d",b); else print f("Greatest value is c=%d",c); }


Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


Draw a flowchart that will determine and display the largest among the three numbers being inputted?

start input A &amp; B if A&gt;B print A is greatest if B&gt;A print B is greatest stop james ola writes.....SOT.


What three numbers have a greatest common factor?

Any three.


What is the sum of the three greatest prime numbers that are less than 39?

The sum of the three greatest prime numbers that are less than 39 is 97.


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html


Write a FORTRAN program using if statement to calculate the smallest of three numbers xyz?

N = x If y &lt; N then N = Y If z &lt; N then N = z Print N


Find the three numbers whose greatest common factor of three numbers is 9 and the sum of the numbers is 90?

63, 18 and 9


Name the greatest common factor of the following numbers three and 37?

The greatest common factor for the numbers 3 and 37 is 1.


What is the greatest three digit even numbers?

The answer is 998.


What 2 numbers are the GCF of one?

The numbers three and five have the greatest common factor of one.


Write a C program that prompts the user for three decimal numbers and prints them trimmed as integer values. For example, if the user informs the values 13.2, 12.5, 102.231, the program prints out 13, 12, 102?

Here's a simple C program that prompts the user for three decimal numbers, converts them to integers, and prints the trimmed integer values: c Copy code #include int main() { double num1, num2, num3; // Prompt the user for three decimal numbers printf(&quot;Enter three decimal numbers: &quot;); scanf(&quot;%lf %lf %lf&quot;, &amp;num1, &amp;num2, &amp;num3); // Convert and print the trimmed integer values int intNum1 = (int)num1; int intNum2 = (int)num2; int intNum3 = (int)num3; printf(&quot;Trimmed integer values: %d, %d, %d\n&quot;, intNum1, intNum2, intNum3); return 0; } In this program: We declare three variables num1, num2, and num3 to store the decimal numbers entered by the user. We use printf to prompt the user to enter three decimal numbers. We use scanf to read and store the user's input in the variables num1, num2, and num3. We then convert these decimal numbers to integers by casting them using (int) and store them in intNum1, intNum2, and intNum3. Finally, we use printf again to print the trimmed integer values. Compile and run the program, and it will prompt you for three decimal numbers and print their trimmed integer values as requested.