This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Update - Thanks to some folks who pointed out a flaw in my code. | |
* I have updated it. Hope it is correct now :-) | |
* Old version can be found here - | |
https://gist.github.com/krisys/4089748/262cbc10d9b9f1cb5df771e14a1e143a86d2ecc6/ | |
*/ | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class sexIdentifier { | |
public static final String HOMOSEXUAL = "homo"; | |
public static final String STRAIGHT = "straight"; | |
public static void main(String args[]){ | |
public String identifyGender(String yourGender, String belovedGender){ | |
if(yourGender.equals(belovedGender)){ | |
return HOMOSEXUAL; | |
}else{ |