Created
May 22, 2014 02:45
-
-
Save NeuroWinter/b761d71de1c775d27709 to your computer and use it in GitHub Desktop.
if else loop
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
for (int i = 0; i < length ; i++ ) { | |
double ran = Math.random(); | |
if(ran <= 0.25){ | |
seqence[i] = 'a'; | |
}else if( ran < 0.25 && ran<=0.5 ){ | |
seqence[i] = 'c'; | |
}else if( ran < 0.5 && ran <= 0.75 ){ | |
seqence[i] = 'g'; | |
}else{ | |
seqence[i] = 't'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment