using System.IO; using System; class Program { static void Main() { /* for(int i=1;i<=10;i++)// i=i+1 { Console.WriteLine("Value of i= {0}",i); for(int j=0;j<5;j++) { Console.WriteLine("{0}",j); } if(i==5) break; }*/ /*int i=0; while(i<=10) { Console.WriteLine("Value of i= {0}",i); i++; int j=0; while(j<5) { Console.WriteLine("{0}",j); j++; } }*/ /*string file="path";//filedirectory StreamReader obj; if(File.Exists(file)==true) { obj=new StreamReader(file); textBox1.Text=obj.ReadToEnd(); obj.close(); } else { COnsole.WriteLine("Error"); } }*/ /*string file="path"; string text=""; StreamReader obj; obj=new StreamReader(file); do { text=text.obj.ReadLine()+"\n"; }while(obj.Peek()!=-1) //COnsole.WriteLine(text); textbox.Text=text;*/ /*int i=0; do { i++; Console.WriteLine("Value of i= {0}",i); }while(i<10);*/ /*string file="path";// StreamWriter obj; obj=new StreamWriter(file,true); obj.Write(textbox.Text);*/ /*string src="path";//inp.txt string des="path1";//inp.txt File.Copy(src,des,true); File.Copy("path","path1",true);*/ string file="path"; string file1="path1"; StreamReader obj; jordan=new StreamReader(file); StreamReader obj; transaction=new StreamReader(file1); string text="",text1=""; do { text=text.jordan.ReadLine(); text1=text1.transaction.ReadLine(); int res=Int32.Parse(text1); int with=0,dep=0; if(res>0) { dep+=res; } else { with-=res;//negative value } }while(obj.Peek()!=-1) with*=-1; /*if(selected=withdrawl) textb.Text=with; else textb.Text=dep;*/ } }
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more