JatGoodwin
McLovin
-HP-
Drunkie
Divran
I wimped out on level 3 too :P
EDIT:
New sig quote
Is it too big? I found it in my server's ULX logs.
Learning meh some C++, getting lonely in the process...
I made me a calculamator!
Code:// initializing C++ #include <iostream> #include <string> #include "windows.h" using namespace std; float multiply(float f, float s) { float tempout=f*s; return(tempout); } float add(float f, float s) { float tempout=f+s; return(tempout); } float subtract(float f, float s) { float tempout=f-s; return(tempout); } float divide(float f, float s) { float tempout=f/s; return(tempout); } int main() { string oper; string oprecognized; string operdisp; string opersymb; string repeatstr; float first; float second=0; float output; int run=0; cout << "Input operation type: "; cin >> oper; if(oper=="multiply"||oper=="add"||oper=="subtract"||oper=="divide" ||oper=="Multiply"||oper=="Add"||oper=="Subtract"||oper=="Divide") {oprecognized=""; } else {oprecognized="not "; run=1;} operdisp= oper=="multiply"||oper=="Multiply" ? "Multiplying" : oper=="subtract"||oper=="Subtract" ? "Subtracting" : oper=="add"||oper=="Add" ? "Adding" : "Dividing"; cout << "Operation "<<oprecognized<<"recognized!\n"; Sleep(1000); while(!run) { cout << "Enter first number: "; cin >> first; cout << "\nEnter second number: "; cin >> second; if(second==0) {cout << "Not an accepted input.\n";} while(second==0&&operdisp=="Dividing") {cin >> second; if(second==0) {cout << "Not an accepted input.\n";} } cout << "\n"<<operdisp<<"..."; if(operdisp=="Multiplying") {output=multiply(first, second);} else if(operdisp=="Adding") {output=add(first, second);} else if(operdisp=="Subtracting") {output=subtract(first, second);} else{output=divide(first, second);} opersymb= oper=="multiply"||oper=="Multiply" ? "*" : oper=="subtract"||oper=="Subtract" ? "-" : oper=="add"||oper=="Add" ? "+" : "/"; cout << "\nFirst "<<opersymb<<" Second = "<<output<<"\n"; Sleep(4000); cout << "\nNew operation? (Y/N) "; cin >> repeatstr; run= repeatstr=="Y"||repeatstr=="y" ? 0 : 1; if(!run) {cout << "\n\n\n"; cout << "Input operation type: "; cin >> oper; if(oper=="multiply"||oper=="add"||oper=="subtract"||oper=="divide" ||oper=="Multiply"||oper=="Add"||oper=="Subtract"||oper=="Divide") {oprecognized=""; } else {oprecognized="not "; run=1;} cout << "Operation "<<oprecognized<<"recognized!\n"; Sleep(1000); } } Sleep(1000); return 0; }
Last edited by mattwd0526; 03-20-2010 at 05:36 PM.
http://www.youtube.com/watch?v=HNVuDXanxCw#movie_player <--- original if you didnt know
[tt]
| | | | | |
v + + + + v
| --- |---| |---| |---| |---| --- |
+ | =| | | | | | | |= | +
------- | | | | | | | | | | | -------
| = | | + | | + | | + | | = |
------- ------- --- /---\ --- ------- -------
^ ^ | =| =| @ |= |= | ^ ^
------- --- |---| --- -------
^ ^ | | ^ | | ^ ^
| | | |
| | | |
|---| |---|
^ ^
[/tt]
Ö͎̗̫̙̝̹͓̤̙́ͣͤ̈́̋̽̋͜f̺̦̠̻̜̼̮͓̖́̓̄̿̓̌̓̍̔f̵̳̻̜̹̤̱̊͒ͤ͌ ̅ͭͮ̾͟i̗͖̎͗̇ͯ̈̀̌̽c̯̮̉ͮ̾͟͡i̵̺̻̠̘̤̫͕ͯͭ̅͊ͤͦͧa̷͇̖̲ͥ͗ͪ̎ͤ ̽̾ͫl̶̈́̉̉͂̿̎ͯͥ̐҉̗͙̦̻̪ ̪̻͕̗̝͈̘͓ͬ̋̕͟B͚̲̍͢ā̸̪͔͖̟ͫͨ͜͝s͈͔͔͖͇͍̗͛ͯ̑̂͟t̮̤̬̩̅ͧ̎͑͗ ̃̕͟a̸̧̻̖̘̞̪̲͈͕̲͊ͭͪ͆̉r̯̩̮̬̥̤̗̙̃͌̑͊͢͞ď̠̦̲̥͢͡ ̵̶̢̱̲̺͈̘̳͕ͤͅo̯̞̙̦͖̪̽ͩ͊ͅf̵̦͈̣͙̰̎͋̿́ͅ ̛͕̹̫̰̱̾̓ͪ̌̽̊͘͡W̨̬̲̤̖̽̿͛ͨ͛̃̎͐̏i̛̼̳̝̺̝̭͙͋̑͑ͬ͠ṙ̼͔̪ͯͨͭ ̕e̸̗͕̰̒̃ͩͬ̾͆́ͅͅ
I Require More Minions! Join us on the IRC !
List of Reasons to idle on the IRC: Wire QDB
Bookmarks