View Full Version : ok i finally got my m0nde scale program working
timmy
08-11-2012, 02:03 AM
<?php
print "\n\nHow fat is m0nde on a scale of 1-10?";
$input = trim(fgets(STDIN));
//***input***
if($input <= 3)
{
$m0nde = leanonoppositeday;
}
else
{
if($input <=5)
{
$m0nde = fatbadcirculation;
}
else
{
if($input <=8)
{
$m0nde = obeselacksdiscipline;
}
else
{
if($net >9)
{
$m0nde = fatfuckheartattack;
}
}
}
}
//***output***
print "\n\nm0nde is $m0nde..";
print "\n\n";
?>
its pretty accurate
elezzzark
08-11-2012, 02:04 AM
Finally you learn PHP
timmy
08-11-2012, 02:05 AM
whats going on why is this fourm being spammed?
not that im saying its not a terrible shit forum that desrves otherwise
elezzzark
08-11-2012, 02:05 AM
I just typed 9 and nothing happens
timmy
08-11-2012, 02:05 AM
Finally you learn PHP
how do i make a GUI for php programs?
elezzzark
08-11-2012, 02:09 AM
how do i make a GUI for php programs?
It's too complicated for you
timmy
08-11-2012, 02:10 AM
what about using flash in html?
elezzzark
08-11-2012, 02:12 AM
Flash will be discontinued soon!
timmy
08-11-2012, 02:14 AM
drunkpuppies will be unemployed then
m0nde
08-11-2012, 02:18 AM
drunkpuppies will be unemployed then
elezzzark
08-11-2012, 02:18 AM
Did you fall in love with Laina Walker?
elezzzark
08-11-2012, 02:21 AM
http://1.bp.blogspot.com/-H1Qiqf4LfI0/UCBqi7WOheI/AAAAAAAABRg/6K9NaymwYkE/s1600/OAG358.jpg
timmy
08-11-2012, 02:21 AM
laina walker is scary as fuck
m0nde
08-11-2012, 02:30 AM
overly attached retard
elezzzark
08-11-2012, 02:32 AM
I pray to god about m0nde will get heart attack soon
elezzzark
08-11-2012, 02:32 AM
or anal cancer
timmy
08-11-2012, 02:35 AM
:rofl:
m0nde
08-11-2012, 03:43 AM
elezzzark really is raged out because someone keeps calling him a retard
he doesn't realize that no one else who he believes hates me, boobz, etc actually thinks about any of this outside the forum
he's the only one who's psychotic enough and enough of a spaz, shut-in retard to take any of this seriously
i really love elezzzark because it's so easy to keep him going
timmy
08-11-2012, 03:46 AM
thanks monde for posting in this thread i missed this post
I just typed 9 and nothing happens
if($net >=9)
{
$m0nde = fatfuckheartattack;
the bolded large equal sign is what i was missing i didnt even notice it thanks elz now i wont be embarased by a bad reason when i make millions off this progrma
barry lets collaborate on a browser-based multiplatform threadlong
m0nde
08-11-2012, 11:15 AM
barry lets collaborate on a browser-based multiplatform threadlonghe just created something to parse a variable and couldn't even get the logic right the first time
i think what you're asking is a little bit beyond him
he just created something to parse a variable and couldn't even get the logic right the first time
i think what you're asking is a little bit beyond him
You don't think he's learned for loops yet?
m0nde
08-11-2012, 11:37 AM
give him a few more weeks
i think he's one of those guys who has to try and fail a few hundred times before he gets it right
you have a point, he has been working on this program for like 2 weeks
i cannot believe i even read that code snippet
i cannot believe i even read that code snippet
gotta start somewhere... What's with the 3 embedded 'if/else' loops though does php not have 'case'?
of course it does but barry doesn't know how to use it
also that wouldn't be the best way to do it anyway
I don't know what kind of wacky class he's taking then, I've been through a few introductory programming classes and they always cover all the loops at the same time.
identical logic expressed in the shortest possible number of instructions
function m0nde($input)
{
if ($input < 4) return leanonoppositeday;
if ($input < 6) return fatbadcirculation;
if ($input < 9) return obeselacksdiscipline;
if ($input > 9) return fatfuckheartattack;
return null;
}
$val = m0nde(trim(fgets(STDIN)));
not sure why barry didn't think 9 was a notable input
oh wait yes i am
m0nde
08-11-2012, 01:06 PM
pretty sure he's giong to look at that code jon posted and not understand how it's the same as what he posted
he just learned loops he probably hasn't gotten to functions yet
also his mind is going to be blown when he learns you're allowed to put spaces in a string
lnopia the great
08-11-2012, 02:40 PM
the biggest question is why elz and barry are posting on this forum when they vowed to never come back
rootbeer
08-11-2012, 02:43 PM
broken promises...
lnopia the great
08-11-2012, 02:46 PM
someone give me a pic of elzarrk so i can photoshop them on some dumb and dumber pics
lnopia the great
08-11-2012, 02:47 PM
i am pretty sure they are literally the two dumbest people ive ever met on the internet
cberry
08-11-2012, 03:17 PM
i took basic logic and program design last semester
cberry
08-11-2012, 03:17 PM
dont remember a thing from it i cheated through the entire thing
barry level accomplishment
elezzark
08-11-2012, 04:27 PM
ur code sucks why if monde => 5 do u even know how to code wtf roflz
m0nde
08-11-2012, 04:44 PM
lulz
also his mind is going to be blown when he learns you're allowed to put spaces in a string
or when he learns what a string actually is
since in this case he's relying on zeev's decision to be polite to retards who use undefined symbols and evaluate the expression to the name of the symbol rather than shit a brick and throw a fatal error like it should
elezzzark
08-11-2012, 06:08 PM
i am pretty sure they are literally the two dumbest people ive ever met on the internet
OB and Barry?
elezzzark
08-11-2012, 06:10 PM
also his mind is going to be blown when he learns you're allowed to put spaces in a string
I'm sure he doesn't even blow his mind about string, which is a set of characters are used for variables, only it returns the typed text.
elezzzark
08-11-2012, 06:12 PM
ur code sucks why if monde => 5 do u even know how to code wtf roflz
I don't care about the codes, but you are talking like a faggot
a string is not a set, elz
elezzzark
08-11-2012, 06:30 PM
I meant string is like "jon is trolling me fucking f@gg0t"
elezzzark
08-11-2012, 06:31 PM
If i say boolean represents true and false, then you reply boolean DOESN´T REPRESENT TRUE AND FALSE
or when he learns what a string actually is
since in this case he's relying on zeev's decision to be polite to retards who use undefined symbols and evaluate the expression to the name of the symbol rather than shit a brick and throw a fatal error like it should
on error resume next
elezzzark
08-11-2012, 06:39 PM
If Barry fails to understand what is string, it will blow our mind
rootbeer
08-11-2012, 06:41 PM
lol wow
If Barry fails to understand what is string, it will blow our mind
barry failing to understand something will never blow my mind
syncan aka ken post jr
08-11-2012, 07:22 PM
all u motherfuckers iz booleans
If i say boolean represents true and false, then you reply boolean DOESN´T REPRESENT TRUE AND FALSE
no you're just unable to command the english language
a string is a sequence, not a set
elezzzark
08-11-2012, 08:09 PM
no you're just unable to command the english language
a string is a sequence, not a set
Here goes again
Why is jon so goddman stupid and motherfucker?
rootbeer
08-11-2012, 08:11 PM
does the set of all sets contain itself, by a bad reason?
elezzzark
08-11-2012, 08:14 PM
Jon never told sequence of characters, he just told sequence and nothing else because he´s stupid
syncan aka ken post jr
08-11-2012, 08:27 PM
vectors are typed arrays ok i know what i am doing
elezzzark
08-11-2012, 09:27 PM
vectors are typed arrays ok i know what i am doing
yes, you're correct
Lock this thread now
boobz
08-11-2012, 09:46 PM
elezzzark really is raged out because someone keeps calling him a retard
he doesn't realize that no one else who he believes hates me, boobz, etc actually thinks about any of this outside the forum
he's the only one who's psychotic enough and enough of a spaz, shut-in retard to take any of this seriously
i really love elezzzark because it's so easy to keep him going
bro i dont hate you lol
timmy
08-11-2012, 09:51 PM
identical logic expressed in the shortest possible number of instructions
function m0nde($input)
{
if ($input < 4) return leanonoppositeday;
if ($input < 6) return fatbadcirculation;
if ($input < 9) return obeselacksdiscipline;
if ($input > 9) return fatfuckheartattack;
return null;
}
$val = m0nde(trim(fgets(STDIN)));
not sure why barry didn't think 9 was a notable input
oh wait yes i am
ive taken two classes in php, cut it out!
timmy
08-11-2012, 09:53 PM
im doing basics of php for 6 weeks then moving on to flash, and soon mysql, the class that i do this in is the shortest class in my course its kind of fun but i dont want to be a programmer im not going to go do computer scfience for that shit
timmy
08-11-2012, 09:55 PM
wow this thread really took a turn for the worse i really regret making this thread
timmy
08-11-2012, 09:58 PM
im going to steal jons array or w/e the fuck that is and pretend i made it up to my teacher and get extra credit
it's a function, barry. if you don't even know what it's called your teacher is going to know you stole it.
i don't find it hard to believe that i cannot explain why a square is a rectangle but a rectangle is not a square to the deaf mexican resident forum retard
barry's going to fail by trying to get ahead
sort of like becoming the outcast by trying to fit in
i sense a meme here
I've noticed a similar trend with other tryhards
timmy
08-11-2012, 11:43 PM
the test in 5 weeks is going to be on fundamentals if i fail it i am literally retarded, after that test we wont do much on php, it will only be in the final test in 12 weeks from now which will involve php, mysql, html, and flash.
the class is just about grasping fundamentals in these 4 areas.
timmy
08-11-2012, 11:44 PM
I've noticed a similar trend with other tryhards
kind of like the time when you got elz to give a fake address/name of yourself to flaglerchat and then OB posting it... good times...
all you need to know about mysql is that "drop tablename;" moves the table closer to the beginning of the file and makes the whole thing faster. it's totally safe to do on production databases.
kind of like the time when you got elz to give a fake address/name of yourself to flaglerchat and then OB posting it... good times...
yeah I've done that like 8 times and they still fall for it
timmy
08-11-2012, 11:47 PM
all you need to know about mysql is that "drop tablename;" moves the table closer to the beginning of the file and makes the whole thing faster. it's totally safe to do on production databases.
im totally going to take your advice and delete tables
it doesn't deleted them it moves them down that's why they call it 'drop' instead of 'delete'
timmy
08-11-2012, 11:59 PM
:yeaok:
also add this to your php project you'll get extra credit
while(1)
pcntl_fork();
timmy
08-12-2012, 12:08 AM
oh yea you just reminded me i got a problem i cant figure out
<?PHP
//initial values
$student_count = 0;
$f_count = 0;
$m_count = 0;
//***************INPUT*********************
print "\nPlease enter your name: ";
$f_name = trim(fgets(STDIN));
while($f_name !="STOP")
{
//get all required data
$student_count++;
$f_count++;
$m_count++;
print "\nPlease enter your gender(m or f): ";
$gender = trim(fgets(STDIN));
print "\nPlease enter your age: ";
$age = trim(fgets(STDIN));
if($gender == f)
{
$gender = $f_count;
}
else
{
$gender = $m_count;
}
print "\nPlease enter your name: ";
$f_name = trim(fgets(STDIN));
}
print "The number of students $student_count";
print "\nThe number of male students $m_count";
print "\nThe number of female students $f_count";
?>
i need to figure out how to make male and female counts go up respectively, does anyone have a solution with using the same syntax?
$f_count++;
$m_count++;
The ++ increases each of those variables by 1, just put another of these in the proper place like the if statements you like so much
timmy
08-12-2012, 12:47 AM
added strtoupper and now it works awesome
{
//get all required data
$student_count++;
print "\nPlease enter your gender(m or f): ";
$gender = trim(strtoupper(fgets(STDIN)));
print "\nPlease enter your age: ";
$age = trim(fgets(STDIN));
if($gender == F)
{
$gender = $f_count++;
}
else
{
$gender = $m_count++;
}
lnopia the great
08-12-2012, 12:52 AM
aaaa real mother fuckin g's
timmy
08-12-2012, 12:54 AM
inopia the terrible
$gender = $f_count++; doesn't make sense, there's no reason to change $gender. just $f_count++; by itself is enough.
boobz
08-12-2012, 02:29 AM
i prefer ladies than code
first of all you need to get some discipline so that your learn how to think like the code should look when it is finished
that probably doesn't make any sense but the best description of what i'm talking about either does not exist or i've never heard it written down and i don't care enough to do the necessary phd work in exploring it
nonetheless a program, conceptually, consists of three parts: input, processing, and output
"what are the things i need to run and how do i clean them up, and/or how do i accept/reject them"
"assuming the ideal inputs, what needs to be done"
"assuming the idea processing results, how does the observer expect to see the output, and what will make sense to them"
if i rewrite your code without telling you this you gain nothing
but now that i have, if i rewrite your code, there's a chance you will learn by example
and since your aren't allowed to use functions yet and this is only the first few times (and your IQ quite possibly is too low anyway) i'm going to delineate each of these concepts with inline comments
<?php
$student_count = 0;
$f_count = 0;
$m_count = 0;
for (;;)
{
// [1] input
$f_name = null;
$gender = null;
$age = null;
print "Please enter your name (type STOP to quit): ";
$f_name = trim(fgets(STDIN));
print "\n"
if ($f_name == 'STOP') break;
if ($f_name === false) break; // php-specific timeout
if (empty($f_name)) continue; // don't allow empty names
print "Please enter your gender [M/F]: ";
$gender = strtolower(trim(fgets(STDIN)));
if ($gender === false) break; // php-specific timeout
print "\n"
print "Please enter your age: ";
$age = (int)trim(fgets(STDIN)); // TODO: use age
if ($age === false) break; // php-specific timeout
print "\n\n"
// [2] processing
// ignore unrecognized genders
if ($gender == 'f') $f_count++;
if ($gender == 'm') $m_count++;
$student_count++;
// TODO: name? age?
}
// [3] output
print "The number of students is: $student_count\n";
print "The number of male students: $m_count\n";
print "The number of female students: $f_count\n";
lnopia the great
08-12-2012, 11:26 AM
do you get off on degrading people on what they dont even know yet
lnopia the great
08-12-2012, 11:30 AM
do you even know how carrier phase differential gps easily enables sub centimeter accuracy you peice of shit fag fuck mother fucker
lol yes i do know how that works
do you know the difference between being honest with yourself and taking something as an insult because it doesn't agree with your feelings
lnopia the great
08-12-2012, 12:09 PM
Why would you ever need to know that
m0nde
08-13-2012, 12:18 AM
i don't find it hard to believe that i cannot explain why a square is a rectangle but a rectangle is not a square to the deaf mexican resident forum retardi'm not the only one who believes elezzark is a retard then
timmy
08-13-2012, 01:39 AM
Thank you jon for thoroughly insulting me and helping me at the same time.
Camoron
08-13-2012, 07:32 AM
ive taken two classes in php, cut it out!
2? really? i was thinking it was like ur first week
or do you mean 2 classes as in 2 class periods not like 2 complete courses? i hope so.
timmy
08-13-2012, 04:58 PM
2? really? i was thinking it was like ur first week
or do you mean 2 classes as in 2 class periods not like 2 complete courses? i hope so.
yes i literally hav ehad 2 days camoronar cut it out
timmy
08-13-2012, 04:58 PM
casual gmer
m0nde
08-14-2012, 12:01 AM
4:50 AM - Ɓarry: i knw you pushed him to the point of no return
rootbeer
08-14-2012, 09:31 AM
Thank you jon for thoroughly insulting me and helping me at the same time.
i wish jon was my dad
m0nde
08-20-2012, 02:45 AM
overly attached retardoverly attached retard
is trolled by girl on the internet
creates web site to make himself look like a spaz
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.