Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

q style

Program HelloWorld(output);
begin
  writeln('Hello, world!');
end
if 3>2 then 1>0
if 1>4 then 4>3

Compile and Execute Pascal Online

Program Kreis;
Var
r,u,f:Real;
Const
p=3.1416;
Begin
read(r);
u:=2*p*r;
f:=p*r*r;
writeln('Flache= ',f:0:2);
writeln('Umfang= ',u:0:2);
End.

Compile and Execute Pascal Online

Program Durchschnitt;
Var
z,x,y:Real;
Begin
read(x);
read(y);
z:=(x+y)/2 ;
writeln('Der Mittelwert von ',x:0:2,' und ',y:0:2,' ist:',z:0:2);
End.

Compile and Execute Pascal Online

Program HelloWorld(output);
begin
  writeln('Hello, world!');
end.

Compile and Execute Pascal Online

Program HelloWorld(output);
type
char_set = set of char;
var
    lett: set of char = ['A','B','C','D','E','F','G','H', 'Z'];
    num: set of char = ['0'..'9','.',',',':','!','?','-','(',')',';','"'];
    str: string;
    flag : boolean;
begin
  flag := True;
  readln(str);
  
  writeln(str);

  if not (str[1] in lett) then
    flag := false;

  writeln(flag);
  
end.

3445

Program NANNY; 
Var T: real; 
begin 
writeln ('Ты вчера был болен. Измерь-ка температуру!'); 
write ('Сообщи, какая у тебя температура:'); 
readln(T); 
if T>36.6 
then begin 
writeln ('Ты еще болен! Раздевайся и ложись в постель.'); 
writeln ('Поправляйся, дружок!') 
end 
else begin 
writeln ('Ты здоров, дружок! Можешь идти в школу.'); 
writeln ('Желаю успехов!') 
end 
end 

2211

program n_3;
var x,y,z,l: real;
begin
readln(x,y);
if (x+y);
readln(z,l);
if (z+l);
end.

test

Program HelloWorld;
begin
  writeln('Halo, dunia!');
end.

Compile and Execute Pascal Online

Program Einkaufen;
var
x,y: real;
n: integer;
Begin 
Writeln('Ein Ananas kostet 3.50 Euro Wie viel Geld haben Sie dabei ');
read(x);
if x<0 then 
Writeln(' Fehler ');
if x>0 then 
n:= trunc (x/3.50);
y:= x-(n*3.5);
Writeln('Sie können ',n,' Ananas kaufen ' );
writeln('Ihr Restgeld ist ',y:0:2,' Euro');
End.

Compile and Execute Pascal Online

Program Gleichung;
var 
a,b,c: integer;
Xn1,Xn2: real;
begin
writeln('Geben Sie die Koeffizienten ein ');
readln(a,b,c);
Xn1:=(-b/(2*a))+( sqrt (b*b-4*a*c)  )/(2*a);
Xn2:=(-b/(2*a))-( sqrt (b*b-4*a*c)  )/(2*a);
Write('Xn1= ',Xn1:0:2);
Write(' Xn2= ',Xn2:0:2);
end.

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.