Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I started C++!
#7
yeah, it's not like QBasic "practical applications" can compare to C++ "practical applications".... C++ is undoubtably the more powerful language... but heck, when am I ever going to use it for practical applications anyways? Tongue

So the teacher made us write a program that would have the user input the price of an item and how much money was given to pay for that item, and then we had to calculate the change received based on dollars, quarters, dimes, nickels, and pennies. NO IF-THEN STATEMENTS ALLOWED, because we "haven't learned about them yet." So it's probably the most retarted way to code this ever, but he made us change the variable types in order to acheive our goal.... for instance:

Say the change was $3.94. In order to get dollars, he wanted us to
Code:
Float change;
int dollars;
int quarters;
int dimes;
int nickels;
int pennies;

(int)dollars = (int)change;

Thereby cutting off the decimal provided by FLOAT, since INTegers don't have decimals... Sad. Then it's basically the same thing over and over... you subtract whatever you got for dollars from change, to just get the decimal, then multiply by 100.1 (the .1 is to assure that no pennies would be rounded off... for instance, in testing I found that sometimes it might give 38.9999991 instead of 39). Divide that number by 25, change it to an INT to get rid of the decimal, that's how many quarters.... ugh, it was stupid. And everyone that I've talked to who actually knows a lot of C++ and stuff is like "OMG, why the hell is he making you do that, that's going to kill you, that's going to scar you for life, that's the worst application of variable typing ever..." So yeah.

LoL the worst part about that class was the first three days, when we weren't even on the computers... we were in a classroom, with a book. Do page 24 problems 1-16. WHAT?? Problems in a C++ book? And they're all like
Code:
A Microcomputer system consists of hardware and _____________.

        A).  Software
        B).  CPU (Central Processing Unit)
        C).  System board
        D).  Windows

Because, apparently, we should "Know what the computer is doing and how it does it before we start putting stuff into it." I was just like GRR! give me a computer! Let me ruin the school's network! I mean.... uh... heheh..... But anyways, it's getting a little better. He keeps wanting us to write algorithms for our projects, but when they're simple and stupid, I have a hard time doing that... most of the time I can't even think about what to do, so I just start coding and eventually figure it out, and then I tweak it till it works and THEN write the stupid algorithm... show it to him, twiddle my thumbs for alittle while, and say "okay, here you go, I coded it."

*sigh*. Why can't they have a QBasic class, that would rock! It would be super boring at first, but I could wow everyone else in the class with my mediocre Qbasic skills.
ovaProgramming.

One night I had a dream where I was breaking balls. The next morning, BALLSBREAKER was born.

Quote: Excellent. Now you can have things without paying for them.

BALLSBREAKER 2
~-_-Status Report-_-~
Engine: 94%
Graphics: 95%
Sound: 100%
A Severe Error has crippled BB2 for the time being... I have to figure it out, but until then you won't see much of it Sad.
-----------------------------
Reply


Messages In This Thread
I started C++! - by NovaProgramming - 04-09-2005, 01:53 AM
I started C++! - by ComDriver - 04-09-2005, 02:17 AM
I started C++! - by shiftLynx - 04-09-2005, 03:09 AM
I started C++! - by urger - 04-09-2005, 04:03 AM
I started C++! - by computerkid14 - 04-09-2005, 05:44 AM
I started C++! - by relsoft - 04-09-2005, 07:32 AM
I started C++! - by NovaProgramming - 04-09-2005, 05:13 PM
I started C++! - by computerkid14 - 04-09-2005, 09:54 PM
I started C++! - by marzecTM - 04-09-2005, 11:08 PM
Re: I started C++! - by seph - 04-09-2005, 11:25 PM
I started C++! - by Rattrapmax6 - 04-10-2005, 03:38 AM
Re: I started C++! - by marzecTM - 04-10-2005, 04:03 AM
I started C++! - by Sterling Christensen - 04-10-2005, 04:32 AM
I started C++! - by NovaProgramming - 04-10-2005, 08:36 PM
I started C++! - by seph - 04-10-2005, 08:45 PM
I started C++! - by Sterling Christensen - 04-10-2005, 09:42 PM
Re: I started C++! - by SJ Zero - 04-10-2005, 10:12 PM
I started C++! - by seph - 04-10-2005, 10:18 PM
I started C++! - by Anonymous - 04-11-2005, 05:07 AM
I started C++! - by relsoft - 04-11-2005, 01:25 PM
I started C++! - by NovaProgramming - 04-12-2005, 05:01 PM
I started C++! - by adosorken - 04-12-2005, 05:07 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)