fork download
  1. program Project2;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. var
  6.  
  7. n,n1,n2,rn1,rn2,acrn2:integer;
  8.  
  9. begin
  10.  
  11. writeln(‘programa que resolve a multiplicaçao muito louca’);
  12.  
  13. writeln(‘digite um valor:);
  14.  
  15. read(n1);
  16.  
  17. writeln(‘digite outro valor:);
  18.  
  19. read(n2);
  20.  
  21. if n1 mod 2 =1 then
  22.  
  23. begin
  24.  
  25. acrn2:=n2;
  26.  
  27. end
  28.  
  29. else
  30.  
  31. if n1 mod 2=0 then
  32.  
  33. begin
  34.  
  35. acrn2:=0;
  36.  
  37. end;
  38.  
  39. rn1:=0;
  40.  
  41. while rn1<>1 do
  42.  
  43. begin
  44.  
  45. rn1:=n1 div 2;
  46.  
  47. rn2:=n2*2;
  48.  
  49. if rn1 mod 2 =1 then
  50.  
  51. begin
  52.  
  53. acrn2:=acrn2+rn2;
  54.  
  55. end;
  56.  
  57. n1:=rn1;
  58.  
  59. n2:=rn2;
  60.  
  61. end;
  62.  
  63. writeln(acrn2);
  64.  
  65. read(acrn2);
  66.  
  67. end.
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.pas:3: warning: unknown compiler directive `apptype console'
prog.pas: In main program:
prog.pas:11: error: invalid character
prog.pas:11: error: invalid character
prog.pas:11: error: invalid character
prog.pas:11: error: undeclared identifier `programa' (first use in this routine)
prog.pas:11: error:  (Each undeclared identifier is reported only once
prog.pas:11: error:  for each routine it appears in.)
prog.pas:11: error: undeclared identifier `resolve' (first use in this routine)
prog.pas:11: error: undeclared identifier `multiplica' (first use in this routine)
prog.pas:11: error: invalid character
prog.pas:11: error: invalid character
prog.pas:11: error: undeclared identifier `muito' (first use in this routine)
prog.pas:11: error: invalid character
prog.pas:11: error: invalid character
prog.pas:11: error: invalid character
prog.pas:11: error: syntax error before `)'
stdout
Standard output is empty