Computer Science, asked by jogendrasharma234, 3 months ago

Write a program to find the middle of 3 supplied numbers ‌


please answer this question​

Answers

Answered by gopikrishnamanaidu
1

Answer:

#include <stdio.h>

#include <stdlib.h>

int main()

{

   int num1,num2,num3;

   printf("Enter three numbers\n");

   scanf("%d %d %d",&num1,&num2,&num3);

//takes input from user

   //checking num1 is a middle number or not

   if(num2>num1 && num1>num3 || num3>num1 && num1>num2){

       printf("\n%d is a middle number",num1);

   }

   //checking num2 is a middle number or not

   if(num1>num2 && num2>num3 || num3>num2 && num2>num1){

       printf("\n%d is a middle number",num2);

   }

   //checking num3 is a middle number or not

   if(num1>num3 && num3>num2 || num2>num3 && num3>num1){

       printf("\n%d is a middle number",num3);

   }

   getch();

   return 0;

}

Explanation:

Answered by sharmajogendra93
1

I have sent it to you

please check it

Similar questions