Results 1 to 12 of 12

Thread: (Pascal)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered 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;


    .

  2. #2
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    "=" ":=" , "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

  3. #3
    MFrost's Avatar
    Join Date: Aug:2005
    Location: /
    Posts: 203
    icaci: Incr(x,y), a Inc(x,y), - - x:=x+y; Mod(a,b), a mod b;
    , ... , , ...

  4. #4
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    FORTRAN - ()
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  5. #5
    Registered 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.

    .

  6. #6
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    Quote Originally Posted by Xenn View Post
    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 mod 2 = 1) S := S + 1;
    writenl('s=',s:4:2);
    end.

    program lol3;
    Var
    s:real;
    begin
    s := 0.0;
    for k:=100 to 250 do <-- ";"
    S:=S + 1/((k*k-10)*(k*k-10)*(k*k-10)*sqrt(2*k));
    writeln('s=',s:4:2)
    end.

    .
    .
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  7. #7
    Registered User
    Join Date: Jun:2007
    Location: Plovdiv
    Posts: 8

    Unhappy

    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.

  8. #8
    Registered User entium's Avatar
    Join Date: May:2003
    Location:
    Posts: 1,426
    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

  9. #9
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    integer Double Real.
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

  10. #10
    Registered 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.

  11. #11
    philosophus duratea icaci's Avatar
    Join Date: Oct:2006
    Location: Aachen
    Posts: 2,698
    , begin/end ?
    Internet - it doesn't make you stupid, it just makes your stupidity more accessible to others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |