Tuesday, 29 October 2019

For...For...Loop(Nested Loop) Condition and Find * pattern_16


For...For...Loop(Nested Loop) Condition and Find * pattern_16
            ///     *
            ///    ***
            ///   *****
            ///  *******
            /// *********
            ///  *******
            ///   *****
            ///    ***
            ///     *
            int i, j, n;
            Console.Write("Enter number of lines.....>");
            n = Convert.ToInt32(Console.ReadLine());
            for (i = 1; i <= n; i++)
            {
                for (j = i; j < n; j++)
                    Console.Write(" ");
                for (j = 1; j <= 2 * i - 1; j++)
                    Console.Write("*");
                Console.ReadLine();
            }
            for (i = n - 1; i >= 1; i--)
            {
                for (j = i; j < n; j++)
                    Console.Write(" ");
                for (j = 1; j <= 2 * i - 1; j++)
                    Console.Write("*");
                Console.ReadLine();
            }
https://www.youtube.com/channel/UCKLRUr6U5OFeu7FLOpQ-FSw/videos

1 comments:

  1. How to make money with a sports bet - Work Paper
    From beginners, it might 파주 출장샵 sound complicated, but when it comes 울산광역 출장샵 to money-making, there's a long 의왕 출장샵 way to go. งานออนไลน์ That's why they're creating their own 의정부 출장샵 betting odds.

    ReplyDelete