Computer Science, asked by Bhoomicharu, 11 months ago

Write a program to print the series for 3,6,12,24, 48,96 using a WHILE....WEND LOOP.

Plz solve it!!!!


Bhoomicharu: okk
Bhoomicharu: hm
Bhoomicharu: suscribed
Bhoomicharu: welcome...
Bhoomicharu: : )

Answers

Answered by SahilNarang
13

num = 3;

I = 0;

while (I<=100)

{

print(num);

num = num*2;

I = I+1;

}

Answered by suchindraraut17
1

Series Program

Explanation:

           int n = 3;

           int yourNum, i = 1, temp;

           Console.WriteLine("Enter your last series number:");

           yourNum = int.Parse(Console.ReadLine());

           Console.WriteLine(n);

           while (i <= yourNum)

           {

               if (i % n == 0)

               {

                   temp = n;

                   n = n * 2;

                   if (n / temp == 2 && n<= yourNum)

                   {

                       Console.WriteLine(n);

                       

                   }

               }

               i++;

           }

Similar questions