I got this program who compiled succesfully but, when I execute it, it keeps say
ID: 3636298 • Letter: I
Question
I got this program who compiled succesfully but, when I execute it, it keeps saying "The system cannot find the file specified." how do I create files that the program can read from and write to? How should I call this files so the program can find them? Here is the program:import java.io.*;
class InputOutput
{
public static void main(String args[])throws Exception
{
FileReader fr = new FileReader("Hello.in");
FileWriter fw = new FileWriter("Hello.out");
int ch;
ch = fr.read();
while(ch != -1)
{
if((char)ch>='A' && (char)ch<='Z')
ch = ch +('a'-'A');
fw.write((char)ch);
ch = fr.read();
}
fr.close();
fw.close();
}
}
Explanation / Answer
to create a file, enter data and write the data to a file : #include "stdafx.h" #include #include using namespace std; int main() { ofstream outputFile; outputFile.open("program3data.txt"); float num1, num2, num3, num4, num5; cout > num1; outputFileRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.