Write a program to print the series for 3,6,12,24, 48,96 using a WHILE....WEND LOOP.
Plz solve it!!!!
Bhoomicharu:
okk
Answers
Answered by
13
num = 3;
I = 0;
while (I<=100)
{
print(num);
num = num*2;
I = I+1;
}
Answered by
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