Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- namespace euler13
- {
- class Program
- {
- static void Main(string[] args)
- {
- int osszeg = 0;
- string sor;
- int elso = 0;
- StreamReader szam = new StreamReader("szam.txt");
- string[] szamok= new string[100];
- for (int i = 0; i < 100; i++)
- {
- szamok[i]=(szam.ReadLine());
- }
- for (int j = 0; j < 50; j++)
- {
- for (int i = 0; i < 100; i++)
- {
- sor=szamok[i];
- elso = Convert.ToInt32(sor[j]);
- Console.WriteLine(elso);
- Console.WriteLine(sor[j]);
- Console.WriteLine(Convert.ToInt32(sor[j]));
- osszeg += elso;
- Console.WriteLine(osszeg);
- }
- osszeg = 0;
- }
- Console.ReadLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement