SHARE
TWEET

Untitled

a guest Feb 28th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var n, number, counter, n_cache, m_cache: integer;
  2. var n_text, m_text: string;
  3.    
  4. begin
  5.   readln(n);
  6.   counter := 0;
  7.  
  8.   Repeat
  9.     readln(number);
  10.  
  11.     If number mod 2 = 0 Then begin
  12.       n_cache := n_cache + number;
  13.       n_text := n_text + number + ' ';
  14.       end
  15.     Else begin
  16.       m_cache := m_cache + number;
  17.       m_text := m_text + number + ' ';
  18.       end;
  19.    
  20.     counter := counter + 1;
  21.   Until n = counter;
  22.  
  23.   writeln(n_text + 'Сумма: ' + n_cache);
  24.   writeln(m_text + 'Сумма: ' + m_cache);
  25. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top