Learn C# The Hard Way
Sunday, December 13, 2015
3. While Loops
IN:
using System;
public class Test
{
public static void Main()
{
int n;
while ((n = int.Parse(Console.ReadLine()))!=42)
Console.WriteLine(n);
}
}
OUT:
1
2
10
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment