Author Topic: I R0XX0RZ T3H \/\/0rLd 'o PrOgRaMiNg!!!!11!!!one!oen!!!11!!  (Read 1887 times)

Efflixi Aduro

  • Veteran
  • *
  • Posts: 1871
  • O_o
    • View Profile
(No subject)
« Reply #15 on: December 11, 2004, 08:29:35 am »
It doesnt work with variables. Is it supposed to?
Lol Internet

RussianVodka

  • Hydlaa Notable
  • *
  • Posts: 689
    • View Profile
(No subject)
« Reply #16 on: December 11, 2004, 02:45:46 pm »
It crashes if you put in characters, it also crashes if you put in numbers like \"3.4\". I could fix that very easily, but i would rather have you find the least common multiple, and put them in like that. Technicaly thats the way you are suposed to to quadratic funcions.

If the above makes no sence... Its cuz i just woke up.



Q: How many Planeshifters does it take to expalin a simple concept to a newb?
A: Six. Five to argue on who\'s explanation is right, and Moogie to lock the thread.

Keknehv

  • Hydlaa Resident
  • *
  • Posts: 62
    • View Profile
(No subject)
« Reply #17 on: December 11, 2004, 06:19:49 pm »
RussianVodka: If you post up the source, we could pretty easily clean it up/give advice,etc.

And you know what the funny thing is? I made a program almost like this on a really stupid $10 calculator.

The only reason that I could do it was because the calculator has \"history\". So I would enter each variable by hand, then I would go up on the history to the two bits for the quadratic formula (one for the -b/2a, another for the sqrt(b^2-4ac)/2a)... Yah... it\'s a pain.

Also, consider putting a WxWindows framework around your program. If there\'s anything that people really love in a program, it\'s certainly UI.

Maybe you could even have your program show the two roots, eh? (instead of just the formulas--most of usually can get that anyways)
root@stupidadmins:/ #  rm -r *

Quote
Originally posted by sesmi
my start bar thingie has moved from the bottom of the screen to the side!!!!! how do i make it go back!!!! help please!!!!!! i\'m sorry this is in the wrong forum but i\'m panicing!!!!!!

RussianVodka

  • Hydlaa Notable
  • *
  • Posts: 689
    • View Profile
(No subject)
« Reply #18 on: December 11, 2004, 06:55:46 pm »
If there are two [rational] roots, it will show them. But most equations dont have those...

try-
A=1
B=-5
C=6



Q: How many Planeshifters does it take to expalin a simple concept to a newb?
A: Six. Five to argue on who\'s explanation is right, and Moogie to lock the thread.

Keknehv

  • Hydlaa Resident
  • *
  • Posts: 62
    • View Profile
(No subject)
« Reply #19 on: December 11, 2004, 07:36:53 pm »
Oh... ok RussianVodka.

I just tried some random numbers to test it out :D

So... could you post up the source?
root@stupidadmins:/ #  rm -r *

Quote
Originally posted by sesmi
my start bar thingie has moved from the bottom of the screen to the side!!!!! how do i make it go back!!!! help please!!!!!! i\'m sorry this is in the wrong forum but i\'m panicing!!!!!!

RussianVodka

  • Hydlaa Notable
  • *
  • Posts: 689
    • View Profile
(No subject)
« Reply #20 on: December 12, 2004, 01:34:48 am »
Code: [Select]

//Quadratic Functions v2.0

#include
#include
#include
#include
using namespace std;

//////////////////////////////////
#define RADICAL radical(a,b,c)
#define INSIDE_RADICAL ((b*b)-(4*a*c))
#define REMAINDER remainder(a, b, c, d, e)


/////////////////////////////////

float r;
float d;
float e;
////////////////////////////////
float radical(int a, int b, int c)
{
    if (INSIDE_RADICAL >= 0)
    {
       r = sqrt(INSIDE_RADICAL);
   }
   else
    {
       r = sqrt((-1)*INSIDE_RADICAL);
  }

   return r;
}
/////////////////////////////////
 float remainder(int a, int b, int c, float d, float e)
  {
   for (d = INSIDE_RADICAL; e = RADICAL;)
  {
       d = d - e;
      if (e>d)
        {
           break;
      }
       else
        {}
  }
   return d;
   }
////////////////////////////////

int main()
{
    int a;
  int b;
  int c;
  float d = 0;
    float e = 0;
    int z = 1;
  string szQuit = \" \";

  cout << \"***The \'X finder\' will find the value of X in a quadratic function***\\n\";
   cout << \"**************************By Egor Poblaguev**************************\\n\";
 cout << \"*** Email: [EMAIL]RussianVodka@mail.ru[/EMAIL] ************* AIM: RussianVodka667***\\n\\n\";

 
    while (z>0)
 {
       for (a=0; a==0;)
        {
       cout << \"Enter value of A: \";
     cin >> a;                           // Ask for value of A.
      }
       cout << \"Enter value of B: \";
     cin >> b;                           // Ask for value of B.

      cout << \"Enter value of C: \";
     cin >> c;                           // Ask for value of C.
      cout << \"\\n\\n\";
////////////////////////////////////////////////////////////////////////////////////////////

     if (INSIDE_RADICAL >= 0)                                        // If \'INSIDE_RADICAL\' is greater than zero.
      {
           if (REMAINDER == 0)                             // If \'INSIDE_RADICAL\' is a perfect square.
           {
               cout << \"One value of X is: \" << ((-b) + RADICAL) / (2 * a) << \".\\n\";
                cout << \"The other value of X is: \" << ((-b) - RADICAL) / (2 * a) << \".\\n\\n\";
         }
           else                                                        // If \'INSIDE_RADICAL\' is not a perfect square.
           {
               cout << \"One formula for X is: (\" << (-b) << \" + sqrt(\" << INSIDE_RADICAL << \")) / \" << (2 * a) << \".\\n\";
                cout << \"The other formula for X is: (\" << (-b) << \" - sqrt(\" << INSIDE_RADICAL << \")) / \" << (2 * a) << \".\\n\\n\";
         }
       }
       else                                                // If \'INSIDE_RADICAL\' is less than zero.
     {
           if (REMAINDER == 0)                             // If \'INSIDE_RADICAL\' is a perfect square.
           {
               if (((b % (2*a)) == 0) && (INSIDE_RADICAL % (2*a) == 0))    // If simplifying is posible.
               {  
                    cout << \"One formula for X is: \" << (-b)/(2*a) << \" + \" << RADICAL / (2 * a) << \"i.\\n\";
                    cout << \"The other formula for X is: \" << (-b)/(2*a) << \" - \" << RADICAL / (2 * a) << \"i.\\n\\n\";
             }
               else                                                    // If simplifying is not possible.
              {
                   cout << \"One formula for X is: (\" << (-b) << \" + \" << RADICAL << \"i ) / \" << (2 * a) << \".\\n\";
                   cout << \"The other formula for X is: (\" << (-b) << \" - \" << RADICAL << \"i ) / \" << (2 * a) << \".\\n\\n\";
                }
           }
           else                                                        // If \'INSIDE_RADICAL is not a perfect square.
           {
               cout << \"One formula for X is: (\" << (-b) << \" + sqrt(\" << -INSIDE_RADICAL << \")i ) / \" << (2 * a) << \".\\n\";
             cout << \"The other formula for X is: (\" << (-b) << \" - sqrt(\" << -INSIDE_RADICAL << \")i ) / \" << (2 * a) << \".\\n\\n\";
          }
       }
       
///////////////////////////////////////////////////////////////////////////////////




//////////////////////////////////////////////////////////////////////////////
       cout << \"Enter \'q\' to quit, or anything else to restart.\";          //
      cin >> szQuit;                                                      //
      cout << \"\\n\";                                                      //
                                                                          //
      if ((szQuit == \"q\") || (szQuit == \"Q\"))                             //
      {                                                                   //  
           cout << \"Quiting...\\n\";                                            //   Quiting Question (While Loop Break).
           Sleep(500);                                                     //
         break;                                                          //
      }                                                                   //
      else                                                                //
      {                                                                   //
          cout << \"Restarting...\\n\\n\";                                    //
      }                                                                   //
//////////////////////////////////////////////////////////////////////////////
    }
   return 0;
}


Um.... It looks a lot less slopy in Visual C++.....
« Last Edit: December 12, 2004, 01:37:41 am by RussianVodka »



Q: How many Planeshifters does it take to expalin a simple concept to a newb?
A: Six. Five to argue on who\'s explanation is right, and Moogie to lock the thread.

Chestar

  • Hydlaa Resident
  • *
  • Posts: 83
    • View Profile
(No subject)
« Reply #21 on: December 12, 2004, 04:31:01 am »
Quote
Originally posted by faldrok
Icefalcon: I can\'t believe you wasted $100 on a friggin\' calculator!! And, that is the type of calculator that can do everything for you...what a shame. In America, you don\'t need to know how to do anything in Math...the calculator can do it for you!!

I stick by my $1 calculator. I just use it when I don\'t have the time to work out 237*543. Other than that, I do it myself...pfft, super calculators.


Yeah, my class required me to buy one also as IceFalcon said, except I got the TI84 Silver Edition, and actually it runs programs well... of course I usually play games on it.
Chestar in the game

*From the moment you are born, you are dying.

http://www.ravenguardguild.tk  or  http://www.ravenguard.50megs.com

faldrok

  • Hydlaa Citizen
  • *
  • Posts: 376
    • View Profile
(No subject)
« Reply #22 on: December 12, 2004, 04:42:25 am »
Laziness is all it is. There isn\'t anything that the calculator does that you can\'t work out. Well, besides the creating programs that work, etc. etc.

Quote
Originally posted by ArcaneFalcon
and other monotanous stuff that I could easily do on my own but simply don\'t want to waste my time with.


That\'s...laziness. You don\'t NEED the calculator to do stuff like that; you just WANT it to. The people that everyone views as \"The Great Mathematicians\" didn\'t use TI-83s and other \"super calculators.\" If they can derive formulas and change the way people think about Math, as a whole, without this calculator, then you can solve the problems that are from their studies without one. All it is is Human Laziness. Like, do people use the remote, or change the channels on the TV? They use the remote. Why? Human Laziness. So, don\'t give me this shit that you need the crap. Yeah, it might make life easier, but do you need it to survive? Hell no.

faldrok

  • Hydlaa Citizen
  • *
  • Posts: 376
    • View Profile
(No subject)
« Reply #23 on: December 12, 2004, 04:42:55 am »
Blah...I think I lagged or something, because I hit \"Post Reply\" and got two...delete this please.
« Last Edit: December 12, 2004, 04:44:44 am by faldrok »

ArcaneFalcon

  • Hydlaa Notable
  • *
  • Posts: 591
  • ?
    • View Profile
(No subject)
« Reply #24 on: December 12, 2004, 05:10:35 am »
You\'re right, great mathemeticians don\'t use calculators.  They use supercomputers with specially designed software that takes hours, days, weeks, etc. to even attempt to solve their problems.

:emerald:

faldrok

  • Hydlaa Citizen
  • *
  • Posts: 376
    • View Profile
(No subject)
« Reply #25 on: December 12, 2004, 05:30:36 am »
Bleh, I was talking in the past, so I, obviously, didn\'t mean the mathematicians of today. I was referring to the people like Isaac Newton, and others way back then. Now, they used no form of computers; they might have had tricks to speed things up a bit, but there is no way that they used a supercomputer or calculator.
« Last Edit: December 12, 2004, 05:31:06 am by faldrok »

ArcaneFalcon

  • Hydlaa Notable
  • *
  • Posts: 591
  • ?
    • View Profile
(No subject)
« Reply #26 on: December 12, 2004, 05:58:08 am »
Ah, I see now.  Boy, I sure am lazy for wanting and using a nice calculator.  You\'re right.  In fact, now that you mention it, why on earth do I need a car?  I\'m not lazy, I can walk.  Also, who the heck needs a stove?  I\'ll just make a fire.  Electric lights?  Nah, that\'s what candles are for.  Meh, I may just become amish.  Yeah, that sounds good.

My point is, just because someone takes advantage of modern technology doesn\'t mean they\'re lazy.  It means that even though they can do things the old fashioned way (which may require more effort) they would rather do it the modern way and save time that can be better spent somewhere else.  And btw, the stuff those great (and old) mathemeticians discovered are, by today\'s standards, very simple.  Today we have things like stream theory (two steps above quantum theory, or three steps above what you learn in physics) that only a handful of people on earth can grasp.

:emerald:

faldrok

  • Hydlaa Citizen
  • *
  • Posts: 376
    • View Profile
(No subject)
« Reply #27 on: December 12, 2004, 07:18:04 am »
Well, I might have went too far with saying \"lazy\", but you guys went too far with saying that you \"need\" this calculator. I\'m not saying that everyone should throw away their calculator, but using it all the time might seem a *bit* lazy. So, yea I exaggerated a bit, but nobody \"needs\" this calculator; it just makes life easier. ;)

Ghostslayer

  • Hydlaa Citizen
  • *
  • Posts: 402
    • View Profile
(No subject)
« Reply #28 on: December 12, 2004, 08:39:52 am »
Quote
Originally posted by faldrok
Well, I might have went too far with saying \"lazy\", but you guys went too far with saying that you \"need\" this calculator. I\'m not saying that everyone should throw away their calculator, but using it all the time might seem a *bit* lazy. So, yea I exaggerated a bit, but nobody \"needs\" this calculator; it just makes life easier. ;)


I\'ll agree with you that some people have become too reliant on their calculators (ie trying to figure out their mark on a test when it is out of 50 or something, or use it for addition of small numbers :P), but there are good uses for it.  
I still think you are underestimating the need for computers and math problems though, especially when things cannot be solved mathematically (there are equations like this: high order differential equations come to mind), and computers/calculators should be the only things to waste their time doing thousands of iterations :D

So in the end, I need :P my calculator, but perhaps not as much as I use it ;)
Blitzers Guild
Hard Work Often Pays Off After Time, but Laziness Always Pays Off Now.

Icefalcon

  • Veteran
  • *
  • Posts: 1610
    • View Profile
(No subject)
« Reply #29 on: December 12, 2004, 06:02:43 pm »
Yeah, Faldrok, what kind of math class are you in? (assuming you are still in school). My calculator was required for Algebra 2, but you can make it through Algebra 2 without it. But once you get into Calc and Trig, you are going to need it, yes need, not want.