Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dim n as integer, i as integer, max as integer, j as integer
  2. dim a(n) as integer
  3. max = 0
  4. input n
  5. for i=1 to n  
  6.    input a(i)
  7. next i        
  8. for i=1 to n-6
  9.    for j=i+6 to n
  10.    if a(i)+a(j) > max then max = a(i)+a(j) endif
  11.    next j
  12. next i
  13. print max
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement