Jump to content

Recommended Posts

Posted

program Askisi;

uses wincrt;

var arithmos, athroisma:real; erwthsh:char;

begin

      writeln("Dwse enan arithmo");

      readln(arithmos);

      writeln("Theleis na sunexiseis? An nai pata to koympi "y" an oxi pata to koympi "n"");

      readln(erwthsh);

          while erwthsh=:"y" do

                  writeln("Dwse enan arithmo");

                  readln(arithmos);

      athroisma:=athroisma+arithmos;

      writeln("Theleis na sunexiseis? An nai pata to koympi "y" an oxi pata to koympi "n"");

      readln(erwthsh);

      end; {while}

writeln("To athroisma ton arithmwn einai:", athroisma);

end.

Posted

Repeat..until καλύτερα για να κάνει πρώτα μια επανάληψη χωρίς να του κάνει ερώτηση, για να απαντήσει ναι ή όχι.

Ναι, ξέρω... απλά δεν την έχουν διδαχθεί ακόμη.

 

program Askisi;
uses wincrt;
var arithmos, athroisma:real; erwthsh:char;
begin
      athroisma:=0;
      erwthsh:="y";
while erwthsh="y"
      writeln("Dwse enan arithmo");
      readln(arithmos);
      athroisma:=athroisma+arithmos;
      writeln("Theleis na sunexiseis? An nai pata to koympi "y" an oxi pata to koympi "n"");
      readln(erwthsh);
   end;
writeln("To athroisma ton arithmwn einai:", athroisma);
end.

Έτσι πρέπει να συντάσσεται...

 

*Και αρχικοποίηση του athroisma.

Posted

Ναι, ξέρω... απλά δεν την έχουν διδαχθεί ακόμη.

 

program Askisi;
uses wincrt;
var arithmos, athroisma:real; erwthsh:char;
begin
      athroisma:=0;
      erwthsh:="y";
while erwthsh="y"
      writeln("Dwse enan arithmo");
      readln(arithmos);
      athroisma:=athroisma+arithmos;
      writeln("Theleis na sunexiseis? An nai pata to koympi "y" an oxi pata to koympi "n"");
      readln(erwthsh);
   end;
writeln("To athroisma ton arithmwn einai:", athroisma);
end.

Έτσι πρέπει να συντάσσεται...

 

*Και αρχικοποίηση του athroisma.

Ωραίος, δεν το είχα σκεφτεί έτσι!
Posted

Dn einai swsto.Exei ena error:

program Askisi;

uses wincrt;

var arithmos, athroisma:real; erwthsh:char;

begin

      athroisma:=0;

      erwthsh:="y";

while erwthsh="y"

      writeln("Dwse enan arithmo");

      readln(arithmos);

      athroisma:=athroisma+arithmos;

      writeln("Theleis na sunexiseis? An nai pata to koympi "y" an oxi pata to koympi "n"");

      readln(erwthsh);

  end;

writeln("To athroisma ton arithmwn einai:", athroisma);

end.

Posted

Δοκίμασε αυτόν τον κώδικα.

program Askisi;

uses wincrt;

var arithmos, athroisma:real; erwthsh:char;

begin

      athroisma:=0;

      erwthsh:='y';

while erwthsh='y' do

  begin

      writeln("Dwse enan arithmo");

      readln(arithmos);

      athroisma:=athroisma+arithmos;

      writeln("Theleis na sunexiseis? An nai pata to koympi "y" an oxi pata to koympi "n"");

      readln(erwthsh);

  end;

writeln("To athroisma ton arithmwn einai:", athroisma);

end.

Posted
program Askisi;

uses wincrt;

var arithmos, athroisma:real; erwthsh:char;

begin

      athroisma:=0;

      erwthsh:='y';

while erwthsh='y' do

  begin

      writeln("Dwse enan arithmo");

      readln(arithmos);

      athroisma:=athroisma+arithmos;

      writeln("Theleis na sunexiseis? An nai pata to koympi "y" an oxi pata to koympi "n"");

      readln(erwthsh);

  end;

writeln("To athroisma ton arithmwn einai:", athroisma);

end.

:p

Posted

ok eftasa sto telos.nmzo einai ok...Apla dn eimai sigouros gt otan pataw run m vgazei ena minima kai dn ktlbenw t leei gt einai mia glwssa xs48αδαdu43r98 kati tetio.... :/

 

Dn pirazei ftanei p eftasa ws edw...

Sas euxaristw olous gia tin voitheia :)

Posted

Γενικά όπου βλέπεις 2πλα εισαγωγικά κάν'τα μονά.

Γιατί; Εμάς δούλευε με διπλά εισαγωγικά. Μήπως στις πιο μετά εκδόσεις το άλλαξαν;
Posted

ok eftasa sto telos.nmzo einai ok...Apla dn eimai sigouros gt otan pataw run m vgazei ena minima kai dn ktlbenw t leei gt einai mia glwssa xs48αδαdu43r98 kati tetio.... :/

 

Dn pirazei ftanei p eftasa ws edw...

Sas euxaristw olous gia tin voitheia :)

Σου βγάζει μήνυμα να πατήσεις y ή n;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...