Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
Type your program source Select your Operating System click compile and download your executable file!
This is the C/C++ Online Compiler.
In online compilers (.net) you can find and use online many compilers ( GCC, MINGW, GFORTRAN, JAVA, GPC, FREEBASIC) for the mainstream languages that exist, you can search THE LINUX MANUAL (DEV MAN) PAGES, the JAVA & WIN32 API'S. Also, i have gathered some material to get you started with programming.
Latest User Submitted Question!

Name: Alina
Title:
  translate it to python
Question:
gram project12;
var
  a,b:array[1 .. 1000] of integer;
  i,n,l,r,m,k,c:integer;
begin
  readln(n,k);
  for i:=1 to n do
    readln(a[i]);
  for i:=1 to k do
    readln(b[i]);
  for i:=1 to k do
    begin
      l:=1;
      r:=n;
      while l<>r do
        begin
          m:=(l r) div 2;
          if (b[i]<=a[m]) then
            r:=m
          else
            l:=m 1;
        end;
  if(a[r-1]-b[i]<0) then
    c:=(a[r-1]-b[i])*(-1)
  else
    c:=a[r-1]-b[i];
  if (r<>1) and ((a[r]-b[i]<c) or(a[r]-b[i]=0)and(c<>0))or(r=1)then
    writeln(a[r])
  else
    writeln(a[r-1]);
  end;
  readln
end.
Answers: Name: songyuhui
jshxajjdhbxba

Name: banme
ne mogu f[[f[f[f[f[f[