Skip to content

Instantly share code, notes, and snippets.

@palcu
Created May 15, 2015 20:42
Show Gist options
  • Save palcu/6f46a2a0599c12a43b80 to your computer and use it in GitHub Desktop.
Save palcu/6f46a2a0599c12a43b80 to your computer and use it in GitHub Desktop.
#include <fstream>
#include <iostream>
using namespace std;
ifstream fok("numar.ok");
ifstream fout("numar.out");
int main()
{
if ( !fout )
{
cout << 0 << ' ' << "Nu exista fisier de iesire!";
return 0;
}
int a, b;
fok >> a;
fout >> b;
if ( a != b )
cout << 0 << ' ' << "Gresit!";
else
cout << 10 << ' ' << "Corect !";
fok.close();
fout.close();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment