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());
for(count = 0; count < 3; count++)
Console.WriteLine(number + count);
}
}
}
Can anyone please help me to solve it?