Professional Documents
Culture Documents
Ejercicios Varios
Ejercicios Varios
n:=10
for a:=1 to n
for b:=1 to n
if myArray[a] = myArray[b] then
res:=res[a]+1;
endif
next
next
aux1:=0
aux2:=0
for c:=1 to
if res[a] > aux then
aux1:= res[a];
aux2:= a;
endif
next
for a:=1 to n
if res[a] > 0 then
print res[a]
if cont = 0 then
print ' '
cont:=1
endif
endif
next
----------------------------
SELECT APPX_department.department_name, count(*),
SUM(APPX_employee.salary)
FROM APPX_employee inner join APPX_department on
APPX_employee.department_id=APPX_department.id
group by APPX_employee.department_id order by
SUM(APPX_employee.salary) asc
-----------------------
array res:=(0,0,0,0,0,0,0,0,0,0)
auxa:=0
auxb:=0
n:=10
for a:=1 to n
for b:=1 to n
if myArray[a] = myArray[b] then
res[a]:=res[a]+1
endif
next
next
for c:=1 to n
if res[c] > auxa then
auxa:= res[c]
auxb:= c
endif
next
for c:=1 to n
if res[c] > auxa then
auxa:= res[c]
auxb:= c
endif
next
array res:=(0,0,0,0,0,0,0,0,0,0)
n:=10
for a:=1 to n
for b:=1 to n
if myArray[a] = myArray[b] then
res:=res[a]+1;
endif
next
next
aux1:=0
aux2:=0
for c:=1 to
if res[a] > aux then
aux1:= res[a];
aux2:= a;
endif
next
array res:=(0,0,0,0,0,0,0,0,0,0)
n:=10
for a:=1 to n
for b:=1 to n
if myArray[a] = myArray[b] then
res:=res[a]+1;
endif
next
next
aux1:=0
aux2:=0
for c:=1 to
if res[a] > aux then
aux1:= res[a];
aux2:= a;
endif
next
n:=9
for a:=1 to n
for b:=1 to n
if myArray[a] = myArray[b] then
res[a]:=res[a]+1
endif
next
next
auxa:=0
auxb:=0
for c:=1 to n
if res[c] > auxa then
auxa:= res[c]
auxb:= myarray[c]
endif
next
println 'Rep:' +' '+ auxa
println 'Val:' +' '+ auxb
---------------------------------------------
array res:=(0,0,0,0,0,0,0,0,0,0)
n:=9
for a:=1 to n
for b:=1 to n
if myArray[a] = myArray[b] then
res[a]:=res[a]+1
endif
next
next
auxa:=0
auxb:=0
for c:=1 to n
if res[c] > auxa then
auxa:= res[c]
auxb:= myarray[c]
endif
next
println 'Rep:' +' '+ auxa
println 'Val:' +' '+ auxb
-------------------------------