Question
C# Programming
1-Write a program that generates the following sequence using while loop 2, 3,6,11, 18, 27,... 102 2-A. Repeat 1 using for lo
5. Using two nested for loops, generate the following 10 20 30 40 50 60 20 30 40 50 60 30405060 40 50 60 50 60 60 Notes:
0 0
Add a comment Improve this question Transcribed image text
Answer #1

\color{blue}\underline{1:}

using System;

public class WhileSequence
{
    public static void Main(string[] args)
    {
        int i = 2, inc = 1;
        while (i <= 102) {
            Console.Write(i + " ");
            i += inc;
            inc += 2;
        }

        Console.WriteLine();
    }
}

2 3 6 11 18 27 38 51 66 83 102 Process finished with exit code 0

\color{blue}as\;per\;guidelines\;we\;are\;only\;allowed\;to\;answer\;first\;program\\ Please\;make\;a\;separate\;post\;for\;remaining\;programs\\ Thanks

Add a comment
Answer #2

n=0

while n<=10:

    print(n*n+2, end='_')

    n=n+1

print()

print("Out of loop. Statements to execute after the expression evaluates to False")

print()

print()

print()


Add a comment
Know the answer?
Add Answer to:
C# Programming 1-Write a program that generates the following sequence using while loop 2, 3,6,11, 18,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT