smatskevich

Summ1

Feb 20th, 2021
463
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. int main() {
  4.   int n = 0;
  5.   std::cin >> n;
  6.  
  7.   int sum = 0;
  8.   int i = 0;
  9.   while (i < n) {
  10.     int tmp;
  11.     std::cin >> tmp;
  12.     sum += tmp;
  13.     ++i;
  14.   }
  15.   std::cout << sum;
  16.  
  17.   return 0;
  18. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×