#3307
fractie6
Se dă un numar n
și n
perechi de numere naturale a
și b
.Să se determine dacă a/b
este fracție finită sau periodică, iar dacă este fracție periodică să se determine dacă este fracție periodică simplă sau mixtă.
Problema | fractie6 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54601933 | Utilizator | |
Fișier | fractie6.cpp | Dimensiune | 838 B |
Data încărcării | 03 Decembrie 2024, 13:50 | Scor / rezultat | Eroare de compilare |
fractie6.cpp: In function 'int main()': fractie6.cpp:7:10: error: 'n' was not declared in this scope cin>>n; ^ fractie6.cpp:8:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ fractie6.cpp:10:15: error: 'a' was not declared in this scope cin>>a>>b; ^ fractie6.cpp:10:18: error: 'b' was not declared in this scope cin>>a>>b; ^ fractie6.cpp:11:10: error: 'aux1' was not declared in this scope aux1=a; ^ fractie6.cpp:12:10: error: 'aux2' was not declared in this scope aux2=b; ^ fractie6.cpp:15:14: error: 'r' was not declared in this scope r=aux1%aux2; ^ fractie6.cpp:20:9: error: 'k' was not declared in this scope k=0; ^ fractie6.cpp:21:9: error: 'x' was not declared in this scope x=0; ^ fractie6.cpp:22:9: error: 'aux' was not declared in this scope aux=b; ^ fractie6.cpp:23:9: error: 'd' was not declared in this scope d=2; ^ fractie6.cpp:26:31: error: expected ')' before ';' token if(aux%d==0&& d==2;||d==5) ^ fractie6.cpp:26:32: error: expected primary-expression before '||' token if(aux%d==0&& d==2;||d==5) ^ fractie6.cpp:26:38: error: expected ';' before ')' token if(aux%d==0&& d==2;||d==5) ^ fractie6.cpp:38:13: error: expected ';' before 'if' if(b==1;||k!=0;&&x==0) ^ fractie6.cpp:38:21: error: expected primary-expression before '||' token if(b==1;||k!=0;&&x==0) ^ fractie6.cpp:38:33: warning: the address of 'x' will never be NULL [-Waddress] if(b==1;||k!=0;&&x==0) ^ fractie6.cpp:38:34: error: expected ';' before ')' token if(b==1;||k!=0;&&x==0) ^ fractie6.cpp:42:21: warning: statement has no effect [-Wunused-value] cout<< ^ fractie6.cpp:42:21: error: expected '}' at end of input fractie6.cpp:42:21: error: expected '}' at end of input fractie6.cpp:42:21: error: expected '}' at end of input fractie6.cpp:38:30: error: label 'x' used but not defined if(b==1;||k!=0;&&x==0) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema fractie6 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.