0
int doubles (int d);
int minimum (int m, int n);
int oddEven (int a);

int main ()
{

	int num, i, sum=0, num1, num2;

	for (i=0; i<5; i++)
	{

		cout<<"please enter a number. ";
		cin>>num;
		cout<<endl;
		sum= sum + num;

	}

	cout<<"the numbers added together is "<<sum<<endl;
	cout<<"the sum of the 5 numbers doubled is "<<doubles(sum)<<endl;
	cout<<endl;

	
	int oOrE=oddEven(sum);

	if (oOrE == -1)
		cout<<"the sum is odd"<<endl;
	else
		cout<<"the sum is even"<<endl;

	cout<<"please enter a number. ";
	cin>>num1;
	cout<<endl;

	cout<<"please enter a number. ";
	cin>>num2;
	cout<<endl;

	cout<<"the minimun of the two numbers is "<<minimum(num1, num2)<<endl;


	
return 0;
}



int doubles (int d)
{
	d=d*2;

	return d;

}

int minimum (int m, int n)
{

	int mini;

	if (m<n)
		mini=m;

	else 
	    mini=n;

	return mini;
}

int oddEven (int a)
{
	int oE;

	if (a%2!=0)//odd
		oE= -1;
		
	
	else 
		oE=1;
		
	return oE;


}
*/
4
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Salem
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.