Monday, 28 October 2019

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


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

0 comments

Post a Comment