Results 1 to 6 of 6

Thread:

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Oct:2010
    Location: Vidin
    Posts: 8

    , . ?
    type danni=real;
    mas1=array [1..40] of danni;
    mas2=array [1..40,1..4] of danni;
    var i,j,m,n,br1,br2,k,c:integer;
    A:mas2;
    dv:mas1;
    Begin
    write ('zadaite broya na redovete:'); readln (m);
    write ('zadaite broya na stalbovete:'); readln (n);
    for i:=1 to m do
    for j:= 1 to n do
    begin
    write ('zadaite elementa ot',i,' -i red i ',j,' -i stalb:');
    readln (A[i,j]);
    end;

    BEGIN
    br1:=0;
    br2:=0;
    c:=0;
    for i:=1 to 4 do
    begin
    for j:=2 to 4 do
    if a[i,j]=2 then c:=c+1;j:=j+1;
    case c of
    1:br1:=br1+1;
    2:br2:=br2+1;
    3:dv[k]:=a[i,1];
    end;
    end;
    end;
    writeln ('1 dvoika-',br1:2,',2 dvoiki-',br2:2,',3 dvoiki-',dv[k]);
    readln;
    end.

  2. #2
    Registered User
    Join Date: May:2008
    Location: bguddd
    Posts: 108
    , .
    ?!
    , , ,
    .

  3. #3
    Registered User
    Join Date: Oct:2010
    Location: Vidin
    Posts: 8
    " : , , . , , ." O , . , , , . 7? Free Pascal 2.4.

  4. #4
    Registered User
    Join Date: May:2008
    Location: bguddd
    Posts: 108
    , .. , . ,
    , .
    Win 7

  5. #5
    Registered User
    Join Date: Oct:2010
    Location: Vidin
    Posts: 8
    . .

  6. #6
    Registered User
    Join Date: May:2008
    Location: bguddd
    Posts: 108
    Code:
    program Project2;
    
    uses
      crt;
      Const Max=100  ;
    
       Type TStudent=record
          F_Number:integer;
          Fizika:integer;
          Math:integer;
          Piik:integer;
          Broj_2:integer;
         end;
      
     
      var  k,i,ONE_2,TWO_2:integer;
           Student:array[1..max]  of TStudent;
    
    
    
    Begin
      Clrscr;
    
       Write('Vavedete broia na Studentite K='); Read(k);
       writeln;
    
       for i := 1 to k do
       begin
    
           Writeln('Stud No:',i);
           Write('Fac.Nomer:'); readln(Student[i].F_Number);
    
    
           Write('O_Fizika:'); readln(Student[i].Fizika);
             if Student[i].Fizika=2 then
                   Inc(Student[i].Broj_2);
           Write('O_Matematika:'); readln(Student[i].Math);
             if Student[i].Math=2 then
                   Inc(Student[i].Broj_2);
           Write('O_Piik:'); readln(Student[i].Piik);
              if Student[i].Piik=2 then
                    Inc(Student[i].Broj_2);
           Writeln;
    
    
       end;
    
       ONE_2:=0;
       TWO_2:=0 ;
    
      for i :=1  to k do
      case  Student[i].Broj_2 of
         1:  inc(ONE_2);
         2:  inc(TWO_2);
    
    
       end;
    
       Writeln('Broj Studenti s edna 2-ka:',ONE_2)  ;
       Writeln('Broj Studenti s dwe 2-ki:',TWO_2)  ;
       Readln;
    
    
         Writeln('Spisyk na studentite s po tri 2-ki:')  ;
      for i :=1  to k do
        if  Student[i].Broj_2=3 then
            Writeln('Fac_nomer:',Student[i].F_Number) ;
    
            readln;
    
    
    
    
    End.

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 |