Calculate area of rectangle and triangle. Following diagram further explains the concept : Shape / \ Rectangle Triangle Test Case 1 Input (stdin) 5 6 Expected Output 30 15 Test Case 2 Input (stdin) 4 5 Expected Output 20 10
#include <iostream>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a;
cin>>b;
c= a*b;
d= c/2;
cout<<c<<"\n";
cout<<d;
return 0;
}