P6-P15: init

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2023-06-05 03:15:38 +05:30
parent 539adc94da
commit 14898356a8
16 changed files with 675 additions and 0 deletions

20
P6.java Normal file
View File

@@ -0,0 +1,20 @@
import java.io.*;
public class P6 {
public static void main(String[] args) throws IOException {
String filePath = "P6.in";
StringBuilder content = new StringBuilder();
try (BufferedReader reader = new BufferedReader(new FileReader(filePath))) {
String line;
while ((line = reader.readLine()) != null) {
content.append(line.toUpperCase()).append("\n");
}
}
try (BufferedWriter writer = new BufferedWriter(new FileWriter(filePath))) {
writer.write(content.toString());
}
}
}