[ create a new paste ] login | about

Link: http://codepad.org/NmvRkW5A    [ raw code | output | fork ]

C++, pasted on Oct 12:
1
2
3
4
5
6
7
8
9
10
11
12
// prog02.cpp           put your name here             area of triangle
#include <iostream> 
using namespace std;
int main() 
{
float length, height, area;
length = 15.2;
height = 12.9;
area = height / 2 * length;
Cout << "the area of a right triangle with height" << height << " and length" << length << " is " << area << endl;
return 0;
}


Output:
1
2
3
In function 'int main()':
Line 10: error: 'Cout' was not declared in this scope
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: