Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System; // -> #include <iostream> c++; import Akjadlkjasd;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO; // - input output -> iomanip
- namespace ConsoleApp2
- {
- class Program
- {
- static void Main(string[] args)
- {
- // cout << "kintamas = " << kintamasis << "yra teigiamas ";
- Console.Write("labas");
- Console.Write("hello"); // -> cout << "hello";
- Console.WriteLine("kita eilute"); // -> cout << "hello" << endl;
- Console.Write("kita eilute2");
- int[] skaiciai = new int[5];
- using (StreamReader reader = new StreamReader(@"..\..\duomenys.txt"))
- {
- string eilute = null;
- while(null != (eilute = reader.ReadLine()))
- {
- string[] dalys = eilute.Split(',');
- for (int i = 0; i < skaiciai.Length; i++) //
- {
- skaiciai[i] = int.Parse(dalys[i]);
- }
- }
- }
- for (int i = 0; i < skaiciai.Length; i++)
- {
- Console.WriteLine("skaiciai[{0}] = {1}", i, skaiciai[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement