Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
991 B
3
Indexable
Never
int n = Convert.ToInt32(Console.ReadLine());                             1    

            int r = 20;                                                  1
            int dummy = 0;                                               1

            Console.WriteLine("Creating a nested loop");                 1

            for (int i = 0; i < n; i++)                                  n+1
            {
                // increase dummy variable
                dummy++;                                                 n

                int j = 0;                                               n
                while (j<n)                                              n*(n+1)
                {   

                    j++;                                                 n*n
                    r = r + dummy;                                       n*n   
                    Console.WriteLine("Inside the second loop " + r);    n*n   


                }

            }