English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

it should be a single program, which takes two files and checks the equality between character by character. if it is not equal in all letters the output will be, how many letters are the equal characters.

2007-03-05 14:23:36 · 1 answers · asked by navee 3 in Computers & Internet Programming & Design

1 answers

You want us to write this for you?

Perhaps some pseudo code...

open file1 and file 2

while [not file1.eof and not file2.eof]
read a character file file1 and file2
if equal, increment counter
end while
print counter

Now you don't say if you need to display the total character from each file. If you do, your while loop will change slightly and you'll have to keep track of the number of characters read from each file. You'll then also need to know if both reads were successful.

2007-03-06 15:34:16 · answer #1 · answered by BigRez 6 · 0 0

fedest.com, questions and answers