using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LearningAgain
{
class WhileLoop
{
public static void Main()
{
//declare an integer
int a = 1;
//Print to console a phrase first off
Console.WriteLine("Let's count!");
//While loop for a is less than 10,000
while (a < 1000)
{
//"{0}" is a placeholder for a variable or string, a is our number 1
Console.WriteLine("{0}", a);
//adds 1 to our number that is printed on screen.
a++;
}
//Keeps the console open
Console.Read();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LearningAgain
{
class WhileLoop
{
public static void Main()
{
//declare an integer
int a = 1;
//Print to console a phrase first off
Console.WriteLine("Let's count!");
//While loop for a is less than 10,000
while (a < 1000)
{
//"{0}" is a placeholder for a variable or string, a is our number 1
Console.WriteLine("{0}", a);
//adds 1 to our number that is printed on screen.
a++;
}
//Keeps the console open
Console.Read();
}
}
}