Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- using namespace std;
- class Rectangle
- {
- //public:
- int len;
- int width;
- };
- int main()
- {
- Rectangle r1;
- r1.len=5;
- r1.width=10;
- cout << "Len=\t" << r1.len << '\n';
- cout << "Width=\t" << r1.width << '\n';
- cout << "Area=\t" << r1.len*r1.width << '\n';
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement