Consider a file log.txt. Each line contain a log output from a certain mail application. From: a@gmail.com To: b@gmail.com From: a@gmail.com To: c@gmail.com From: b@gmail.com To: c@gmail.com Now write a program to read from the file and find out how many times each sender has sent the message. Output the number in a output.txt file: а 2 b 1
Consider a file log.txt. Each line contain a log output from a certain mail application. From: a@gmail.com To: b@gmail.com From: a@gmail.com To: c@gmail.com From: b@gmail.com To: c@gmail.com Now write a program to read from the file and find out how many times each sender has sent the message. Output the number in a output.txt file: а 2 b 1
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6PE
Related questions
Question
Object Oriented
![1.
Consider a file log.txt. Each line contain a log output from a certain mail application.
[5]
From: a@gmail.com To: b@gmail.com
From: a@gmail.com To: c@gmail.com
From: b@gmail.com To: c@gmail.com
Now write a program to read from the file and find out how many times each sender
has sent the message. Output the number in a output.txt file:
а 2
b 1](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F378d1efd-8348-4736-92bd-2385c6d56cce%2Fce52c171-a7d8-428b-8860-b104abf66550%2F03vgff4_processed.png&w=3840&q=75)
Transcribed Image Text:1.
Consider a file log.txt. Each line contain a log output from a certain mail application.
[5]
From: a@gmail.com To: b@gmail.com
From: a@gmail.com To: c@gmail.com
From: b@gmail.com To: c@gmail.com
Now write a program to read from the file and find out how many times each sender
has sent the message. Output the number in a output.txt file:
а 2
b 1
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT