[humor] чет/нечет

Julie16

C http://www.thedailywtf.com/

Function IsEven(N)
Dim LastDigit
LastDigit = int(N) mod 10
IsEven = (LastDigit = 0) or (LastDigit = 2) or _
(LastDigit = 4) or (LastDigit = 6) or (LastDigit = 8)
End Function

Function IsOdd(N)
Dim LastDigit
LastDigit = int(N) mod 10
IsOdd = (LastDigit = 1) or (LastDigit = 3) or _
(LastDigit = 5) or (LastDigit = 7) or (LastDigit = 9)
End Function

stm7892235

мда...

koly

зато можно при необходимости легко сделать четными все xxxx5 числа или наоборот нечетными все xxxx2. Гибкость в предельном ее проявлении

lera98

Я валяюсь перед могуществом мысли!
http;//www,thedailywtf,com/ - это сайт приколов, да?

rosali

Это лучшее

/**
* Does something
*
* @return Nothing
*/
public void imTooBusyToAddJavadoc {
...

enochka1145

Спасибо! Давно я так не смеялся.
Оттуда же
-- begin Horror.java  ---
/**
* All code include in this class is REAL!
*/
public class Horror {

public boolean compareObjects(Object obj1 , Object obj2) {
if (obj1.equals(obj2) == true)
return true;
else
return false;
}

public horribleBreakingLoops {
try {
for (int i = 0; i < 100; i++) {
if (i == 98) {
// Yes, java does have 'break' to exit loops
throw new Exception;
}
}
} catch (Exception e) {}
}

public stringsHorror(String lastName) {
if (lastName.charAt(0) == new String("*").charAt(0)
|| lastName.charAt(0) == new String("%").charAt(0 {
// here goes the code ;)
}
}

protected int myHorrorIndex = new Integer("1").intValue;

public long fearOfCastingHorror {
return System.currentTimeMillis + new Double(Math.random.longValue;
//instead of return System.currentTimeMillis + (long)Math.random;
}

/**
* Does something
*
* @return Nothing
*/
public void imTooBusyToAddJavadoc {
/**
* The method 'imTooBusyToAddJavadoc' was written by my former subordinate.
* His code was comment-free, so I asked him to document his code with
* javadoc, which is used to build documentation of the class library.
* Obviously he added too-much javadoc ;)
* /
}

public boolean checkIsNull(Object a) {
if( !a.equals(null) ) {
/// it's really kilin' me ;)
}
}

int getHttpPort throws IllegalArgumentException {
/// and which is the illegal argument?
}
}
-- end Horror.java ---
Оставить комментарий
Имя или ник:
Комментарий: