#include <iostream>
using namespace std;


bool res(int x,int y)
{
       if(x>y)
       return true;
       else
       return false;
}
int area(int x, int y,int r)
{
         if(r=1)
         cout<<\"사각형의 넓이는 \"<<(x*y)<<endl;
         else if(r=0)
         cout<<\"삼각형의 넓이는 \"<<(x*y)/2<<endl;
         return 0;
}
int main(void)
{
          int x,y;
         bool r;
         cout<<\"변수 2개 입력 \";
         cin >> x >> y;
         r=res(x,y);
        area(x,y,r);
        return 0;
}

자꾸 사각형의 넓이만 구해집니다....
어디를 수정해야되나요?