Created
June 22, 2016 23:44
-
-
Save ezesundayeze/63b6f4d3f8f8d18269dd1c298bfe20fa to your computer and use it in GitHub Desktop.
count serial numbers with even numbers apearing negative, while odd appears positive
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
using System; | |
public class PositiveOddNegativeEven{ | |
public static void Main(){ | |
for(int i=0; i<20; i++){ | |
if(i%2==0){ | |
Console.WriteLine(i); | |
}else{ | |
Console.WriteLine("-"+i); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment