+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    4,022,364.25
    Rep Power
    221

    Default Area Calculator [C++]

    might come in handy if you have some geometry homework :Headbang:
    Download Here
    Code:
    //SonniE's Area Calculator A WWW.codinghs.COM Original
    #include <iostream>
    using namespace std;
    int main()
    {
        cout << "Welcome To SonniE's Area Calculator!";
        double length, width, side, height, radius, base, area;
        char type;
         cout << "\n s = square, r = rectangle, c = circle, p = parallelogram t = triangle\n Enter Your Figure: ";
         cin >> type;
         if (type == 's')
         {
                  cout << "\n Enter the length of a side:";
                  cin >> side;
                 area = side * side; 
                 cout << "The Area of your Square is: " << area << "\n";
                 system("pause");
                 }
         if (type == 'r')
                  {
                  cout << "\n Enter The Length of your figure: ";
                  cin >> length;
                  cout << "\n Enter The Width of your figure: ";
                  cin >> width;
                  area = length * width;
                  cout << "\n The Area of your Rectangle is: " << area << "\n";
                  system("pause");
                  }      
         if (type == 'c')
                 {
                  cout << "\n Enter The Radius of your figure: ";
                  cin >> radius;
                  area = radius * radius * 3.141592654;
                  cout << "\n The Area of your circle is aprox: " << area << "\n";
                 system("pause");
                 }
         if (type == 'p')
         {
                  cout << "\n Enter The Base of your figure: ";
                  cin >> base;
                  cout << "\n Enter The Height of your figure: ";
                  cin >> height;
                  area = base * height;
                  cout << "\n The Area of your Parallelogram is: " << area << "\n";
                  system("pause");
                  }
         if (type == 't')
         {
                  cout << "\n Enter the Base of your figure: ";
                  cin >> base;
                  cout << "\n Enter The Height of your figure: ";
                  cin >> height;
                  area = .5 * base * height;
                  cout << "\n The Area of your Triangle is: " << area << "\n";
                  system("pause");
                  }
    return 0;
                 }


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

  2. #2
    Join Date
    Feb 2008
    Location
    New York
    Posts
    3,114
    Points
    2,876,018.34
    Rep Power
    227

    Default

    haha, this would come in handy next year when i have geometry....

  3. #3
    Join Date
    Jan 2008
    Posts
    272
    Points
    558,429.00
    Rep Power
    215

    Default

    Quote Originally Posted by scruffy120 View Post
    haha, this would come in handy next year when i have geometry....
    what grade are you in? lol


    oh and sonnie why dont you use math variables so its like "Length of base: X-13"

    ;)
    [11-10, 23:08] teh.exploit im not going to say anything cause hacker117 will own me...



    xxscruffy120xx (5:13:08 PM): were did u find that?
    Gamerremag10 (5:13:48 PM): searched for it in google
    xxscruffy120xx (5:14:17 PM): u searched how to masterbate?.....
    Gamerremag10 (5:14:21 PM): ? no


  4. #4
    Join Date
    Jan 2008
    Location
    PA
    Posts
    1,164
    Points
    4,022,364.25
    Rep Power
    221

    Default

    what do u mean i just tried for making it basic


    Get Vip: »Here«
    Donate: »Here«
    >>List of Compilers<<
    >>SFDM Name Generator<<
    [Owner Of FluidCoding]

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts