Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
418 B
0
Indexable
Never
#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <math.h>
#include <algorithm>
using namespace std;
string filename = "foo.txt";
int asd()
{
	ifstream file(filename);
	if (!file.is_open())
	{
		cout << "ERROR" << filename << endl;
		return 0;
	}
	int n;
	file >> n;
	file.close();
	return n;
}
int main()
{
	int n = asd();
	cout << "chislo " << n << endl;
}
Leave a Comment