[圖解C] Example 802: compare value1 to value2 by using function - void

// Example 802: compare value1 to value2 by using function
// using void

#include <stdio.h>
#include <stdlib.h>

void find_Max(int x, int y)
{
     if (x >= y)
         printf("Max = %d\n", x);
     else
         printf("Max = %d\n", y);
}

int main()
{
    int v1, v2;
   
    printf("enter the integer v1: ");
    scanf("%d", &v1);
    printf("enter the integer v2: ");
    scanf("%d", &v2);
   
    find_Max(v1, v2);
   
    system("pause");
    return 0;
}