SHARE
TWEET

Untitled

a guest Jun 25th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Temp.cpp : This file contains the 'main' function. Program execution begins and ends there.
  2. //
  3.  
  4. #include "pch.h"
  5. #include <iostream>
  6.  
  7. int main()
  8. {
  9.  
  10.     bool Backwards = true;
  11.     int ChildCount = 15;
  12.  
  13.     int CountStart = 0;
  14.     int TempTotal = 0;
  15.     int Direction = 1;
  16.  
  17.     if (Backwards)
  18.     {
  19.         TempTotal = ChildCount - 1;
  20.         CountStart = ChildCount - 1;
  21.         Direction = -1;
  22.     }
  23.  
  24.  
  25.     for (int i = CountStart; i != (ChildCount - TempTotal - 2); i += Direction)
  26.     {
  27.  
  28.  
  29.         std::cout << i << std::endl;
  30.  
  31.     }
  32.  
  33.     system("pause");
  34. }
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