fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. static void Main(string[] args) {
  6. string s = "0123456789ABCDEF";
  7. Console.WriteLine(" 0 1 2 3 4 5 6 7 8 9 A B C D E F");
  8. for (int i = 0; i != 16; i++) {
  9. Console.Write("{0} ", s[i]);
  10. for (int j = 0; j != 16; j++) {
  11. Console.Write("{0} ", LessProg(i, j) ? "*" : " ");
  12. }
  13. Console.WriteLine();
  14. }
  15. }
  16. static bool LessProg(int a, int b) {
  17. return (b - a) >= (a <= b ? 8 : -8);
  18. }
  19. }
Success #stdin #stdout 0.02s 14788KB
stdin
Standard input is empty
stdout
  0 1 2 3 4 5 6 7 8 9 A B C D E F
0                 * * * * * * * * 
1 *                 * * * * * * * 
2 * *                 * * * * * * 
3 * * *                 * * * * * 
4 * * * *                 * * * * 
5 * * * * *                 * * * 
6 * * * * * *                 * * 
7 * * * * * * *                 * 
8 * * * * * * * *                 
9   * * * * * * * *               
A     * * * * * * * *             
B       * * * * * * * *           
C         * * * * * * * *         
D           * * * * * * * *       
E             * * * * * * * *     
F               * * * * * * * *