#include <iostream>
using namespace std;
int max(int num1, int num2)
{
int result;
if (num1 > num2)
{result = num1;}
else
{result = num2;}
result= result-7;
return result;
}
int min (int num1,int num2 )
{
int result;
if(num1<num2)
{result = num1;}
else
{result =num2;}
result= result+5;
return result;
}
int sum(int num1,int num2)
{
int c, d, sum;
c = max(num1, num2);
d=min (num1, num2);
sum=c+d;
return sum;
}
int main ()
{
int a;
cin>>a;
int b;
cin>>b;
int p;
p = sum(a, b);
if(p>10)
cout << "First entered value is greator: " <<endl;
else
cout << "First entered value is smaller: " <<endl;
}
using namespace std;
int max(int num1, int num2)
{
int result;
if (num1 > num2)
{result = num1;}
else
{result = num2;}
result= result-7;
return result;
}
int min (int num1,int num2 )
{
int result;
if(num1<num2)
{result = num1;}
else
{result =num2;}
result= result+5;
return result;
}
int sum(int num1,int num2)
{
int c, d, sum;
c = max(num1, num2);
d=min (num1, num2);
sum=c+d;
return sum;
}
int main ()
{
int a;
cin>>a;
int b;
cin>>b;
int p;
p = sum(a, b);
if(p>10)
cout << "First entered value is greator: " <<endl;
else
cout << "First entered value is smaller: " <<endl;
}
*****************************************
Output:
Comments
Post a Comment