#include<iostream>
#include <fstream>
using namespace std;
int ReadFile(string name){
fstream inputFile;
int num;
//opening the file
inputFile.open(name);
//reading num
inputFile >> num;
//returning num
return num;
}
int main(){
cout<<ReadFile("input.txt");
}
NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.
Please Like and Support me as it helps me a lot
Get Answers For Free
Most questions answered within 1 hours.