Pagini recente » Cod sursa (job #2029221) | Cod sursa (job #2051849) | Statistici Oporanu Aurel (oporanu) | Rating Costin Marica (costyn) | Cod sursa (job #2440544)
#include <fstream>
using namespace std;
bool eReductibila(int a, int b) {
if (b % a == 0 || b % a == 0)
return true;
return false;
}
int main() {
ifstream fin("fractii.in");
ofstream fout("fractii.out");
int n;
fin >> n;
int rez = 0;
for (int i = 1; i <= n; ++i)
for (int j = 1; j <= n; ++j)
if (!eReductibila(i, j))
++rez;
fout << rez;
return 0;
}