| Another C++ Script | |
|
|
Author | Message |
---|
ninga95 Administrator
Posts : 122 Join date : 2010-07-30 Age : 29
| Subject: Another C++ Script February 23rd 2011, 3:11 am | |
| Make sure you have Dev-C++ downloaded, then compile and run this code. - Code:
-
#include <iostream> #include <cmath>
int main () { using namespace std; int answers; cout << "How old is ya mom?" << endl; do { cin >> answers; if (answers > 35) cout << "Too High!" << endl; else if (answers < 35) cout << "Too Low" << endl; else cout << "Correct!" << endl; } while (answers != 35); system("pause"); return 0; } This will bring a output up when you runs it, and it asks you how hold ya mom is if ya post less then 35 it prints too low, and if you post greater then 35 then it prints TOO high, but if ya put 35 it prints correct, and also if ya keep getting it wrong then ya gotta keep doing it, I learned C++ rather quickly and on my 20th tutorial, but if ya need help on some C++ then i can definitely help you. | |
|
| |
Supernapalm Expert Scripter
Posts : 393 Join date : 2011-01-17
| Subject: Re: Another C++ Script February 25th 2011, 11:11 pm | |
| im going to learn C, which i think ill go with rather than C++ | |
|
| |
ninga95 Administrator
Posts : 122 Join date : 2010-07-30 Age : 29
| Subject: Re: Another C++ Script February 26th 2011, 11:34 pm | |
| C, and C++ basically the same
Just two different languages and slightly different syntax. | |
|
| |
naknak Administrator
Posts : 878 Join date : 2010-07-30
| Subject: Re: Another C++ Script February 26th 2011, 11:45 pm | |
| I got a C++ key logger :D | |
|
| |
ninga95 Administrator
Posts : 122 Join date : 2010-07-30 Age : 29
| Subject: Re: Another C++ Script February 27th 2011, 12:01 am | |
| | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: Another C++ Script March 8th 2011, 6:54 am | |
| what does the cmath file do? | |
|
| |
Guest Guest
| Subject: Re: Another C++ Script March 8th 2011, 2:14 pm | |
| O.o, what tutorial did it take you #20 to do that? Only, like, #8 on the ones I used, I was well into pointers. You should go to a faster paced tutorial. |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: Another C++ Script March 9th 2011, 6:24 am | |
| what's the point of including the cmath file when you don't even use it? | |
|
| |
ninga95 Administrator
Posts : 122 Join date : 2010-07-30 Age : 29
| Subject: Re: Another C++ Script April 2nd 2011, 1:24 pm | |
| cmath library allow you to use every math function C++ provides
You may see things like
#include but in this case we use #include for all math functions. | |
|
| |
myrco919 Intermediate Scripter
Posts : 190 Join date : 2011-01-21 Age : 26 Location : Holland
| Subject: Re: Another C++ Script April 2nd 2011, 6:04 pm | |
| Another C++ Script?
*Sigh* :c | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: Another C++ Script April 2nd 2011, 7:13 pm | |
| - ninga95 wrote:
- cmath library allow you to use every math function C++ provides
You may see things like
#include but in this case we use #include for all math functions. i know that but there's no point of including it if you don't even use any of the math functions in the code. you may as well include all the other library's if your going to do that. | |
|
| |
ninga95 Administrator
Posts : 122 Join date : 2010-07-30 Age : 29
| Subject: Re: Another C++ Script April 3rd 2011, 6:32 pm | |
| - Quote :
i know that but there's no point of including it if you don't even use any of the math functions in the code. you may as well include all the other library's if your going to do that. ^^ I know, but i am use to including cmath header a lot while programming anything in C++. | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: Another C++ Script April 4th 2011, 3:04 am | |
| i guess it's kinda a good library, what functions are in the lib? | |
|
| |
ninga95 Administrator
Posts : 122 Join date : 2010-07-30 Age : 29
| Subject: Re: Another C++ Script April 6th 2011, 8:23 pm | |
| What do you mean? Like what other function's can you include? | |
|
| |
myrco919 Intermediate Scripter
Posts : 190 Join date : 2011-01-21 Age : 26 Location : Holland
| Subject: Re: Another C++ Script April 7th 2011, 4:45 pm | |
| | |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: Another C++ Script April 12th 2011, 9:44 am | |
| no I mean like what are the functions in the library is there like sqrt, ceil, floor, cuberoot.
all of those functions I could make myself. :P | |
|
| |
Guest Guest
| Subject: Re: Another C++ Script August 6th 2011, 1:22 am | |
| - blueymaddog wrote:
- i guess it's kinda a good library, what functions are in the lib?
Documentation of the cmath lib can be found here c plus plus.com / ref ere nce/ cli bra ry/c math/ " New members are not allowed to post external links or emails for 7 days. Please contact the forum administrator for more information." RRRRAAAAGGGEEE |
|
| |
blueymaddog Administrator
Posts : 1081 Join date : 2010-12-09 Age : 26
| Subject: Re: Another C++ Script February 12th 2012, 4:06 am | |
| your allowed to post offsite stuff here as long as it abides by the rules. | |
|
| |
branefreez Intermediate Scripter
Posts : 143 Join date : 2012-07-14
| Subject: Re: Another C++ Script July 15th 2012, 2:37 pm | |
| Heres a JavaScript code that may scare some people (note: I DID NOT MAKE THIS): - Code:
-
<script> <!-- Fake virus and format made by Coolmale at MasterMinds Forever --> <!-- Please don't copy this without giving the proper credit --> window.onerror=null; var down;
function Minutes(data) { for(var i=0;i<data.length;i++) if(data.substring(i,i+1)==":") break; return(data.substring(0,i)); }
function Seconds(data) { for(var i=0;i<data.length;i++) if(data.substring(i,i+1)==":") break; return(data.substring(i+1,data.length)); }
function faketake(percent1){ if(percent1 < 100){ percent1++;
window.status="Upload of virus in progress: "+percent1+"% complete"; fid1=window.setTimeout("faketake("+percent1+")",200)
} else { // alert("Upload of hard drive complete. Thank you for your donation.\nNow deleting files..."); fid1=window.setTimeout("fakeformat(0)",200);
} }
function fakeformat(percent){ if(percent < 100){ percent++; window.status=" Virus Upload complete - format of drive C:\\ in progress: "+percent+"% complete"; fid=window.setTimeout("fakeformat("+percent+")",360); // 900 } else { window.status="Virus DeActivated... Closing Browser."; window.close() } }
window.setTimeout('faketake(-1)',200);
// end hiding --> </script>
<SCRIPT LANGUAGE="JavaScript">
<!-- ;
alert("HEY YOU"); alert("LOOK DOWN IN THE LEFT HAND CORNER"); alert("SEE THAT?"); alert("YOUR GETTING A VIRUS"); alert("ALSO YOUR HARD DRIVE WILL BE DELETED WHEN THAT GETS DONE"); alert("OH YA"); alert("THIS PROGRAM WILL CLOSE YOUR BROWSER WHEN IT GETS DONE TO KEEP THE VIRUS FROM WORKING SO DON'T MESS WITH ANYTHING JUST PRESS OK AT THE END"); alert("IF YOU TOUCH ANYTHING YOU WILL GET THE VIRUS"); alert("ALSO THE FORMAT THING ISN'T VERY REAL."); alert("IT ONLY GETS RID OF A FEW SYSTEM FILES"); alert("SO NO BIGGIE"); alert("JavaVirus made by Coolmale");
// end hide -->
</SCRIPT> | |
|
| |
Sponsored content
| Subject: Re: Another C++ Script | |
| |
|
| |
| Another C++ Script | |
|