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 ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- using (StreamReader sr = new StreamReader("mertertekek.csv",Encoding.Default))
- {
- int viz = 0;
- int jég = 0;
- int gőz = 0;
- while (!sr.EndOfStream)
- {
- string olvas = sr.ReadLine();
- int a = Convert.ToInt32(olvas);
- if (a>100)
- {
- gőz++;
- }
- if (a<0)
- {
- jég++;
- }
- else
- {
- viz++;
- }
- }
- Console.WriteLine("Halamzállapot"+gőz);
- Console.WriteLine("Halmazállapot"+jég);
- Console.WriteLine("Halmazállapot"+viz);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement