Developer community
+2 votes
2.3k views
asked by Advisor (7.1k points) 10 23 42 | 2.3k views

2 Answers

+1 vote
Program:
#include <stdio.h>
int main()
{
 int a, b, c;
 printf("Enter a,b,c: \n");
 scanf("%d %d %d", &a, &b, &c);

 if (a > b && a > c)
{
 printf("a is Greater than b and c");
 }
 else if (b > a && b > c)
{
 printf("b is Greater than a and c");
 }
 else if (c > a && c > b)
{
 printf("c is Greater than a and b");
 }
 else
{
 printf("all are equal or any two values are equal");
 }
 return 0;
}


Output:
Enter a,b,c: 3 5 8
c is Greater than a and b
answered by Expert (12.3k points) 7 12 25
0 votes

 

#include<stdio.h>
main()
{
int a,b,c;
printf("\n Input the three numbers :");
scanf("%d%d%d",&a,&b,&c);
if(a>b)
{
if(a>c)
{
printf("\n Maximum= %d\n",a);
}
else
{
printf("Maximum= %d\n",c);
}
}
else if(b>c)
printf("\n Maximum= %d\n",b);
else
printf("\n Maximum= %d\n",c);
}
answered by Sr Member (1.2k points) 2 5 15

Related questions

0 votes
2 answers
asked by john Guru (27.1k points) 33 50 100 | 76 views
+1 vote
2 answers
+1 vote
2 answers
asked by Prahasan Prasad Jr Member (390 points) 2 2 7 | 4.3k views
0 votes
1 answer
asked by keem Expert (13.2k points) 27 43 59 | 229 views
+2 votes
2 answers
asked by Smita Advisor (7.1k points) 10 23 42 | 8.7k views
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

Categories


C Books Guide and List
C++ Books Guide and List
Best Java Books

3.8k questions

4k answers

117 comments

10.7k users

3,751 questions
4,046 answers
117 comments
10,709 users