#include <stdio.h>
int sub(int, int);//prototype
int divide(int, int);

void main()
{
	int x = 4, y = 8,total,option;
	printf("What do you want to do?\n\n");
	printf("1.Subtract\n");
	printf("2.Divide\n\n");
	scanf("%d", &option);

	if (option == 1)
	{
		total = sub(x, y);  //total holds result of running function
	}
	else 
	{
		total = divide(x, y);
	}
	printf("The total was %d", total);
}

int sub(int a,int b)
{
	int result;
	result = b - a;
	return result;//int being returned (one value only)
}

int divide(int a,int b)
{
	int result;
	result = b / a;
	return result;
}