SHARE
TWEET

Untitled

anon20016 Dec 8th, 2019 105 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     #define _CRT_SECURE_NO_WARNINGS
  2.  
  3.     #include <iostream>
  4.     using namespace std;
  5.  
  6.     int main() {
  7.         setlocale(LC_ALL, "Russian");
  8.         // вывести все четные числа до 100
  9.         for (int i = 2; i <= 100; i = i + 2) {
  10.             printf("%d ", i);
  11.         }
  12.  
  13.         printf("\n");
  14.         // вывести все степени 2 до 1000
  15.         for (int i = 1; i < 1000; i = i * 2) {
  16.             printf("%d ", i);
  17.         }
  18.  
  19.         printf("\n");
  20.         // вывод чисел от n до 1
  21.         for (int i = 25; i >= 1; i = i - 1) {
  22.             printf("%d ", i);
  23.         }
  24.  
  25.         return 0;
  26.     }
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