Read the records from the file, store them in a list. Print the list in the console
SAMPLE OUTPUT
ID NAME CGPA
1 Bob 3.64
2 Alice 3.25
3 Eve 2.3
Write
[x] Problem-4
Write a program that will take N numbers as input from the console and store them in a file called numbers.txt. Each number should be stored in separate lines.
[x] Problem-5
Take some pairs of numbers as input from the console and store the formatted summation result in a file called pairs.txt
SAMPLE INPUT
10 20
30 40
50 60
pairs.txt should look like following:
10 + 20 = 30
30 + 40 = 70
50 + 60 = 110
[ ] Problem-6
Take a string as input from the console and store only the unique letters of the string in a file called letters.txt line by line.
SAMPLE INPUT
Hello World
letters.txt should look like the following:
H
E
L
O
W
R
D
Read & Write
[ ] Problem-7
Consider the following file input.txt is given. It contains the below data.
10
30
50
Read the numbers from the file and find the summation of the numbers. Finally, store the summation result into another file called output.txt
output.txt should look like the following:
sum = 90
[x] Problem-8
Consider the following file input.txt is given. It contains some information of people (name & age).
bob 14
alice 20
eve 17
Read the data from the file and store them into another file called output.csv in CSV format.
TUTORIALS
FileWriter & FileReader
BufferedReader
PROBLEMS
Read
[x] Problem-1 Consider the following file
numbers.txt
is given. It contains the below data.Read the numbers from the file line by line and print them in the console
SAMPLE OUTPUT
[x] Problem-2 Consider the following file
pairs.txt
is given. It contains the below data.Read the numbers from the file line by line and print the sum of each pair in the console
SAMPLE OUTPUT
[x] Problem-3 Consider the following file
students.txt
is given. It contains the below data.Read the records from the file, store them in a list. Print the list in the console
SAMPLE OUTPUT
Write
[x] Problem-4 Write a program that will take N numbers as input from the console and store them in a file called
numbers.txt
. Each number should be stored in separate lines.[x] Problem-5 Take some pairs of numbers as input from the console and store the formatted summation result in a file called
pairs.txt
SAMPLE INPUT
pairs.txt
should look like following:[ ] Problem-6 Take a string as input from the console and store only the unique letters of the string in a file called
letters.txt
line by line.SAMPLE INPUT
letters.txt
should look like the following:Read & Write
[ ] Problem-7 Consider the following file
input.txt
is given. It contains the below data.Read the numbers from the file and find the summation of the numbers. Finally, store the summation result into another file called
output.txt
output.txt
should look like the following:[x] Problem-8 Consider the following file
input.txt
is given. It contains some information of people (name & age).Read the data from the file and store them into another file called
output.csv
in CSV format.output.csv
should look like the following:SUBMISSION
Your submission should have the following files: