{filestream f=new filestream("path",fileMode.open,fileaccess.read);
streamreader sr=new streamreader(f);
string l=sr.readToEnd();
int chars,words,lines;
char[]linek={'\n'};
char[]wordk={ ' ' , ' , ' , ' . ' , ' ; ' , ' \n '};
string[]word=l.split(wordk );
string[]line=l.split(linek);
chars=l.Length;
words=word.Length;
lines=line.Length;
console.writeline("char:"+chars);
("words:"+words);
("lines:")+lines);
f.close();
sr.close();
}
GOODLUCK
Answer of q11 sheet 1
Posted by
Mahmoud Alaa
, Saturday, April 17, 2010 at 3:19 PM, in
Labels:
File Organization
Subscribe to:
Post Comments (Atom)
2 comments:
هو الدكتور حسين قال هيجيب انهي مسالة الجورزنم
chapter 1,2 (book propabilty) and chapter 1 (statsic in section)
Post a Comment