QUESTION 8: Write a program to input three integers and print the largest and smallest integers using suitable mathematical functions.
Answers
Answered by
2
Answer:
Write a program to input three integers and print the largest and smallest integers using suitable mathematical functions.
Answered by
1
using c programming:
#include<stdio.h>
#include<conio.h?
void main()
{
int a,b,c;
printf(“Enter the 3 numbers:”);
scanf(“%d\n%d\n%d\n”,&a,&b,&c);
if((a>b)&&(a>c))
printf(“%d is the largest”,a);
else if(b>c)
printf(“%d is the largest”,b);
else
printf(“%d is the largest”,c);
if((a<b)&&(a<c))
printf(“%d is the smallest”,a);
else if(b<c)
printf(“%d is the smallest”,b);
else
printf(“%d is the smallest”,c);
getch();
}
Hope it helps ❤️
Similar questions
English,
11 days ago
Physics,
11 days ago
India Languages,
9 months ago
English,
9 months ago
Math,
9 months ago