2. Feladat: Végtelenig Listából
using
System;using
System.Collections.Generic;using
System.Linq;using
System.Text;using
System.Threading.Tasks;namespace
ConsoleApplication1{
class Program{
static void Main(string[] args){
List<double> szamok = new List<double>(); int i = 0; while (true){
Console.Write("Kerem a {0}. szamot:", i + 1); string s = Console.ReadLine(); double d = double.Parse(s.Replace('.', ',')); if (d == 0.0) break; else szamok.Add(d); i++;}
}
}
}