Results 1 to 12 of 12
Thread: (Pascal)
Hybrid View
-
4th June 2007 14:28 #1Registered User
Join Date: Jun:2007
Location: Plovdiv
Posts: 8
(Pascal)
, .. :
http://xerron.data.bg/Scan0002.bmp
C++ . C++ :
==================1=============
cout << "vuvedete x\n";
int x;
cin >> x;
int y,z;
y = 2*x*x + 4;
z = 3*x + sqrt(x+1);
cout << "y = " << y << endl;
cout << "z = " << z << endl;
temp = y;
y = z;
z = temp;
cout << "y = " << y << endl;
cout << "z = " << z << endl;
==================2=============
int S = 0;
for(int i = 1; i <= 20; i++)
if( i % 2 == 1 ) S+= i;
cout << "S = " << S << endl;
==================3==============
double S = 0;
for(int k = 100; K <= 250; k++)
S+= 1 / (k*k-10)*(k*k-10)*(k*k-10)*sqrt(2k);
cout << "S = " << S << endl;
.
-
4th June 2007 14:49 #2
"=" ":=" , "cout << a << b << c << endl" "WriteLn(a,b,c)", "cin >> a" "ReadLn(a)". "var", "int" "Integer", "double" "Double", "x += y" "Incr(x, y)", "for(x = x0; x < x1; x++)" "for x := x0 to x1 do", "if (a == b)" "if a = b then", "a % b" "Mod(a,b)".
Pascal, "" .
.. . , .Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
4th June 2007 15:07 #3
icaci: Incr(x,y), a Inc(x,y), - - x:=x+y; Mod(a,b), a mod b;
, ... , , ...
-
4th June 2007 15:47 #4
FORTRAN - ()
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
11th June 2007 01:44 #5Registered User
Join Date: Jun:2007
Location: Plovdiv
Posts: 8
4

:
program lol;
Var
y,z,x:integer;
readln(x);
y:=2*x*x+4;
z:=3*x+sqrt(x+1)
temp=y;
y:=z;
z=temp;
writeln('y=',y);
writeln('z=',z);
End.
program lol2;
Var
s,x:integer;
Begin
for x:=1 to 20 do;
if (x % 2 = 1) S+=1;
writenl('s=',s:4:2);
end.
program lol3;
Var
s:real;
begin
Double(s=0);
for k:=100 to 250 do;
S:=1/(k*k-10)*(k*k-10)*(k*k-10)*sqrt(2k);
writenl('s=',s:4:2)
end.
.
-
11th June 2007 14:24 #6
-
11th June 2007 20:21 #7Registered User
Join Date: Jun:2007
Location: Plovdiv
Posts: 8
program lol2;
var
s:integer;
i:integer;
Begin
s:=1;
for i:=1 to 20 do
S:=(s+2)*i;
writeln('s=',s:0)
end.
program lol3;
var
k:integer;
S:real;
Begin
s:=0;
fork k:=100 to 250 do
S:=s+1/((k*k-10)*(k*k-10)*(k*k-10)*sqrt(2*k));
writeln('s=',s:0:2)
end.
2 3 -
Pascal-a.. 1
:*(
Last edited by Xenn; 11th June 2007 at 20:34.
-
12th June 2007 10:04 #8
begin integer; x*x sqr(x).
EP43-DS3|E5200@3.33|ASUS EN9800GT HB /HTDI/ 512MB|2X2GB 800MHZ CL5 A-DATA|WD2500JB|NEC 4750A|BELINEA 1980S2
-
12th June 2007 16:20 #9
integer Double Real.
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others
-
12th June 2007 20:02 #10Registered User
Join Date: Jun:2007
Location: Plovdiv
Posts: 8
, . :
program lol;
Var
a,y,z,x:real;
begin
readln(x);
y:=3*sqr(x)+4;
z:=3*x+sqrt(x+1);
writeln('y=',y);
writeln('z=',z);
begin
a:=z;
z:=y;
y:=a;
writeln('y=',y);
writeln('z=',z);
end;
end.
-
12th June 2007 20:42 #11
, begin/end ?
Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others




Reply With Quote

Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in