What is wrong with this

Write your question here.
CodeBlocks won't run this code, I've just broken my computer :c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  #include <iostream>
using namespace std;

int findArea(int length, int width);
int main()
{
   int length;
   int width;
   int area;

   cout << "\nHow wide is your yard? ";
   cin >> width;
   cout << "\nHow long is your yard? ";
   cin >> length;

   area = findArea (length, width);

   cout << "\nYour yard is ";
   cout << area;
   cout << " square feet\n\n";
   return 0;


 }

 int findArea(int 1, int w)
 {
     return 1 * w;
 }
int findArea(int 1, int w)

'1' is a number, and not a valid name for a variable.


and other reasons why single-letter names are bad.
Topic archived. No new replies allowed.