Last active
August 29, 2015 14:06
-
-
Save ddio/d9f07c3ef44141930579 to your computer and use it in GitHub Desktop.
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
private void DoSomething(int number) | |
{ | |
for(int i=0; i<=number; i++) | |
{ | |
if(i%15 == 0) | |
{ | |
Console.WriteLine("InterFace"); | |
} | |
else if (i%3 == 0) | |
{ | |
Console.WriteLine("Inter"); | |
} | |
else if (i%5 == 0) | |
{ | |
Console.WriteLine("Face"); | |
} | |
else | |
{ | |
Console.WriteLine(i.toString()); | |
} | |
} | |
} |
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
function dosth( a ) { | |
for( i = 0; i <= a; i++ ) { | |
if( i % 15 == 0 ) { | |
console.log( 'InterFace' ); | |
} else if( i % 3 == 0 ) { | |
console.log( 'Inter' ); | |
} else if( i % 5 == 0 ) { | |
console.log( 'Face' ); | |
} else { | |
console.log( i ); | |
} | |
} | |
} |
DoSomething(10)
InterFace
1
2
Inter
4
Face
Inter
7
8
Inter
Face
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DoSomething(5)