I am sitting in my C++ class right now, and it is really dumb. He is basically just reading some powerpoints and making us watch him. Right now, he is showing us how to write decimals in binary. It is really awesome. Wait...wait... nope, no it isn't. We had to write a program in MATLAB this morning that took the number 1, and added .0001 to it until you got 2. I instead wrote it in C++ and here it is:
#include "stdafx.h"
#include
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
float x=0;
cout <<"start:";
cin >>x;
while (x != 2)
{
if (x <= 2)
{
x = (x + .0001);
cout << x;
cout <<"\n";
}
}
int num;
cin >> num;
return 0;
}
Derek was pseudo proud. I had to have him troubleshoot if for me because I threw in too many semicolons. It was out of control. When I ran it, it pretty much killed my battery. Yup, my computer is THAT awesome. I am pretty sure that the battery percent was dropping so fast that it was skipping full integers on its way down.
Since last semster ended, I got my grades from it. Here is how they are: mediocre.
This class is brutal. I get to sit in here for two hours, three times a week. It is pretty craptacular.
Categories
- 335 (2)
- Ace (1)
- Aircraft (7)
- Andrew (3)
- ASU (1)
- AYCJ (4)
- Biking (2)
- Birthmas (2)
- Black Ops (1)
- Bombachus (22)
- Brain Candy (2)
- Brian (1)
- Burn Notice (5)
- C++ (1)
- CAD (2)
- Capstone (4)
- Ce En (7)
- Climbing (3)
- Clipboard (3)
- Dave (18)
- Derek (26)
- Disney World (2)
- DLSDF (1)
- Emily (1)
- Fluids (6)
- Forbes (4)
- Gabi (2)
- Gaming (1)
- Geophysics (2)
- Guns (6)
- Harward (7)
- Heat Tran (1)
- Hillier (11)
- Homework (5)
- Jackets (1)
- Jet Engines (1)
- Jobs (1)
- Jon (1)
- Kinematics (3)
- Liv (3)
- Long Beach (2)
- Lost (2)
- Manufacturing (3)
- Math (21)
- MEMS (3)
- Movies (3)
- MW2 (1)
- Nerdism (1)
- New York (3)
- Nexus (7)
- Nina (3)
- Obama (1)
- Orlando (1)
- Physics (7)
- Poker (1)
- Politics (1)
- Proiecte (1)
- Puerto Rico (3)
- Rambling (1)
- Romania (2)
- Room (1)
- Russian (1)
- School (43)
- Stennett (7)
- Tacos (2)
- Tests (7)
- Thermo (6)
- TJ (2)
- TV (2)
- Wii (1)
- Work (6)
Monday, May 4, 2009
C++
Posted by
brimis
at
9:57 AM
0
comments
Subscribe to:
Posts (Atom)