Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

some C++ question

Name: that nigger 2009-04-02 2:29

so /prog/rammers can you tell me why this only returns
x=1 y=1
I'm trying to have it return the values that equal 133745639

heres the code:

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
unsigned long int x = 1;
unsigned long int y = 1;
unsigned long int z;


while ( z != 133745639)
{
z = x * y ;

if ( z = 133745639 )
{
cout << "x=" << x << "y=" << y << endl;
}
else
x++;
}
system("PAUSE");
return 0;

}

Name: Anonymous 2009-04-02 19:29

>>23
I've got better things to do with my time
Perhaps this is true. The poor person who is reading your code and trying to figure out how that works. Even assuming there was a find_foo() function that returned zero on failure (rare, find should return -1 on failure) the notation you've used does not lend itself to readability, especially when you have a non-contrived-to-support-your-exact-point example. If you are trying to tell me forcing unicode support for a language like C (or the hypothetical soon-to-be C like language) is a better choice, you are a complete retard.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List