Computer Science, asked by Tasmia001, 16 days ago

Can anybody help me to do C Program to find largest ,middle and smallest among three nos flowchart please?

Answers

Answered by samarthkrv
1

Answer:

#include <stdio.h>

void sort(int arr[] , int len){

   {

for(int i = 0; i < len; i++)

{

for(int j = 0; j < len; j++)

 {

 if(arr[i] < arr[j])

  {

  int temp = arr[i];

  arr[i] = arr[j];

  arr[j] = temp;

  }

 }

}

}

}

int main() {

   int arr[3];

   printf("Enter all 3 numbers \n");

       for(int i = 0; i < 3; i++){

           scanf("%d" , &arr[i]);

       }

   sort(arr,3);

   printf("The lowest number is %d \n" , arr[0]);

   printf("The middle number is %d \n" , arr[1]);

   printf("The highest number is %d \n" , arr[2]);

}

Explanation:

Similar questions