fork download
  1. Program Pex;
  2. Type Natural=0..MaxInt;
  3. Var I, k, m, n : Natural;
  4. Function SumaCifrelor(i:Natural): Natural;
  5. Var suma: Natural;
  6. Begin
  7. Suma:=0;
  8. Repeat
  9. Suma:=suma+(I mod 10);
  10. i:=i div 10;
  11. until i=0;
  12. SumaCifrelor:=suma;
  13. End;
  14. Function SolutiePosibila(i:Natural):Boolean;
  15. Begin
  16. If SumaCifrelor(i)=m then SolutiaPosibila:=true
  17. Else SolutiePosibila:=false;
  18. End;
  19. Procedure PrelucrareaSolutiei(i:Natural);
  20. Begin
  21. Writeln(‘i=, i);
  22. K:=k+1;
  23. End;
  24. Begin
  25. Write(‘Dati n=); 
  26. readln(n);
  27. Write(‘Dati m=); 
  28. readln(m);
  29. K:=0;
  30. For i:=0 to n do
  31. If SolutiePosibila(i) then PrelucrareaSolutiei(i);
  32. Writeln(‘K=, K);
  33. Readln;
  34. End.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas: In function `SolutiePosibila':
prog.pas:16: error: undeclared identifier `SolutiaPosibila' (first use in this routine)
prog.pas:16: error:  (Each undeclared identifier is reported only once
prog.pas:16: error:  for each routine it appears in.)
prog.pas: In procedure `PrelucrareaSolutiei':
prog.pas:21: error: invalid character
prog.pas:21: error: invalid character
prog.pas:21: error: invalid character
prog.pas:21: error: invalid character
prog.pas:21: error: invalid character
prog.pas:21: error: invalid character
prog.pas:21: error: syntax error before `,'
stdout
Standard output is empty