Cod sursa(job #369477)
Utilizator | Data | 28 noiembrie 2009 14:49:00 | |
---|---|---|---|
Problema | Fractii | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.3 kb |
#include<fstream.h>
using namespace std;
#include<iostream>
int main()
{ ifstream f("fractii.in");
ofstream g("fractii.out");
int N,P,Q,j=0;
f>>N;
for(P=1; P<=N; P++)
for(Q=1; Q<=N; Q++)
if(!(P%Q==0))
g<<P<<"/"<<Q;
j++;
f.close();
g.close();
return 0;
}