Hello, I’m working on this task:
Write a program that reads an integer count and a double number from the console. Then print the double number count times to the console, adding 1 to the number each time it prints. For example:
>3
>7.926
7.926
8.926
9.926
Here is my code:
namespace DoubleType
{
class DoubleInLoops
{
static void Main(string[] args)
{
int count = int.Parse(Console.ReadLine());
double number = double.Parse(Console.ReadLine());
Console.ReadLine(number);
for(int i = 0; i < count; i = i++)
{
Console.WriteLine(number);
number = number + 1;
}
}
}
}
Can anyone please help me to solve it?