Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  8
Language: PASCAL
Code:
program d;
Var N, x, m1, m2, l, i, K:integer;
Begin
Readln(N) ;
Read(K);
L:=0;
M1:=-1;
M2:=-1;
For i:=1 to N DO 
Begin
If l mod K =0 then 
Begin 
If x>m1 then
Begin 
M2:=m1;
M1:=x;
End;
If (x>m2) and (x<m1) then 
M2:=x;
End;
End;
Writeln(m1, m2);
End.
          
Comments: