Computer Science, asked by Brainlyaryabhatt, 1 year ago

write a program that accepts two numbers from the user and determine the smaller of the two numbers full stop using function to find out the smaller number​ he / she would be marked as brain list

Answers

Answered by Anonymous
0

#include <stdio.h>

/* Function declarations */

int max(int num1, int num2);

int min(int num1, int num2);

int main()  

{

   int num1, num2, maximum, minimum;

   

 

   printf("Enter any two numbers: ");

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

   

   maximum = max(num1, num2);  

   minimum = min(num1, num2);

   

   printf("\nMaximum = %d\n", maximum);

   printf("Minimum = %d", minimum);

   

   return 0;

}

int max(int num1, int num2)

{

   return (num1 > num2 ) ? num1 : num2;

}

int min(int num1, int num2)  

{

   return (num1 > num2 ) ? num2 : num1;

}

Hope it helps :)

Similar questions