This was my first assignment for when I used C++. Here is the coding, and maybe it will help you better understand the assignment. I used the program code blocks.
between the {} put in this...
// making "b" the variable for the base length of the triangle.
float b;
// making "h" the variable for the height of the triangle.
float h;
// beginning of the program.
cout << "Enter the Base length of the Triangle:" << endl;
cin >> b;
cout << "Enter the height of the Triangle" << endl;
cin >> h;
// declaring "A" as the variable for the area of the triangle.
float a;
a = b * h/2;
cout << "The area of the triangle is:" ;
cout << a << endl;
return 0;