#include <stdafx.h>
#define LIFESPAN 74
int main void()
{
...int happiness = 0;
...int years = 0;
...for(years; years < 14; years++)
...{
......happiness++;
...}
...for (years; years <= LIFESPAN; years++)
...{
......if (happiness > 0)
......{
.........happiness = 0;
......}
...}
}
>No sub functions
>stdafx.h included but no use of its classes or functions
You fail anon
while(true)
OP().isaFaggot()
>>24132323
>No brackets
>() for both the class name and function name
Jesus guys
So what is Visual Basic exactly? My buddy is having trouble with it but I heard it's supposed to be easier than c++. I feel like i should help him
>>24132313
>sub functions
it's a ~15 line program lmao
>>24132313
v-visual studio users are people too
>>24132381
It's like C# for complete babbies, mostly handles windows form applications like a calculator or something.
The if's look like:
If x then
-----------------
end if
That's all I remember from high school
>>24132381
>My buddy
>Not just admitting its you
Where do you think you are
>>24132262
I don't get this program. Isn't it just setting happiness to 0 after age 13? What's the point of the second for loop when you can just set happiness to 0 after the first for loop is finished.
Or if you want to iterate through all the years of the life span you could have just done that in the first loop and put a conditional in there that resets after 13
>>24132418
Damn. He's actually worried about failing and he even has a tutor. I think I should help him out if it's that much simpler than C++
>>24132462
Happiness isn't always 0, it goes up but eventually the loop checks it and it goes back down to 0.
>>24132462
Killing yourself at 15 is a valid compile-time optimization.
Actually this program has no side effects, so it's 100% dead code. The metaphor is deep.
>>24132496
I've never used Visual Basic before but it looks like happiness only increments up to 13 and then for the second loop it immediately resets it to 0 and it'll stay that way forever
so it would be like 11.. 12... 13... first loop ends with happiness == 13 and second loop executes and it'll iterate once and become 0... because of the conditional until LIFESPAN ends
Am I understanding this incorrectly?
>>24132520
kek
>>24132640
This is in C, not VB. The second loop would only activate once a year and bring happiness back down to 0, so it can increase during that downtime.
>>24132688
ok thanks 123
As someone who was recently employed as a software engineer I find this thread triggering.
>>24132800
As someone who is currently employed as a software engineer I find this thread /jobsecurity/
>>24132800What do you actually do at work? I'm at uni
>>24132847
I used to work on embedded control systems. I did a whole bunch of shit, front end UI, operating system stuff (linux), low level control code running on MCUs.
Then I quit due to being miserable all the time! Now I'm unemployed.
>>24133005
Shitty place to work (like shit coworkers etc) or you didn't like the things you were working on?
>>24132847
The work wasn't the main problem though. The company, the location, and basically my entire life being a total shit. Software is a good-ass field of study
>>24133058
Oh I see. Thanks for answering my question.
>>24132262
int main(){
return 420;
}
>>24133150
Haha I kind of pre-empted it because I realized I was painting a really grim picture for a student
My career advice: good people >> interesting work
i= setToZero();
while(getTrue()){
....i = makeBigger(i);
....if(isBigEnough(i, 10)){
........doBreak();
....}
}
bool getTrue(){ return true; }
int makeBigger(int num){ return num + 1; }
int setToZero(){ return 0; }
bool isBigEnough(int num, int test){ return num < test; }
void doBreak(){ break; }
>gag program joke
Reddit humour desu senpai daijobu shikata ga nai
>>24133312
> void doBreak(){ break; }
tip toppity, hip hoppity, sing songity, flip floppity KEK!
You're retarded m80. Calling that function does absolutely nothing. In fact your compiler would complain about a break outside a loop and refuse to compile that function.
Shit for brains/10
>>24133409
I knew that when I posted it, but are all programmers as autistic as you?
#include <math.h>
#include <stdio.h>
#include <float.h>
#include <stdlib.h>
#include <mylib.h>
#include <mylib.c>
#include <time.h>
struct aaaa{double f; double gf; int fff; int temp; double s;}//gf means girlfriend
aaaa aaaa;
int main()
{
double nogf = 0;
aaaa* aaaaa = &aaaa;
aaaaa->gf = nogf;
if(aaaaa->gf > 0)
{
if(aaaaa->gf < 0)
{
if(aaaaa->s > -1)
{
aaaaa->s = aaaaa->s*2;//s means sad
}
}
}
return 1;
}
>>24133463
Lol, nah don't front senpai. I picked up on the superfluous and hyperbolic nature of your code when I saw it, but the rest of it is actually valid and would compile successfully.
That one function on the other hand wouldn't. Don't hide your incompetence behind "hurr durr I make funny".
> shit for brains 2: the soiling
> kekedoodledooooooooooo
bump for codes