Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Programmer: swazeyyy:
- Date: 2/11/12
- */
- #include <iostream>
- #include <string>
- using std::cout;
- using std::cin;
- using std::endl;
- // Function declaration
- int AreaCalc(int,int);
- // Variable declaration
- int length = 0;
- int width = 0;
- int area = 0;
- // Main function
- int main()
- {
- cout << " #---------------------# " << endl;
- cout << " * * " << endl;
- cout << " * Area Calculator * " << endl;
- cout << " * * " << endl;
- cout << " #---------------------# " << endl;
- system("pause"); // Note: Required Windows
- cout << " * * " << endl;
- cout << " * Enter the length:";
- cin >> length;
- cout << " * Enter the width:";
- cin >> width;
- area = AreaCalc(length,width);
- cout << " * Total Area: " << area << " *" << endl;
- cout << " * * " << endl;
- cout << " #---------------------# " << endl;
- system("pause"); // Note: Required Windows
- return 0;
- }
- // Function definition
- int AreaCalc(int a, int b)
- {
- int c;
- c=a*b;
- return c;
- }
Add Comment
Please, Sign In to add comment