Tuesday, September 24, 2019

Plane Animation in Dev C++

#include <windows.h>
#include <iostream.h>
#include <conio.h>

int main()
{ char plane[][92] = { {"__  _                             "},
                       {"\\ `/ |                           "},
                       {" \\__`!                           "},
                       {" / ,' `-.__________________       "},
                       {"'-'\\_____                []`-.   "},
                       {"   <____()-=O=O=O=O=O=[]====--)   "},
                       {"     `.___ ,-----,_______...-'    "},
                       {"          /    .'                 "},
                       {"         /   .'                   "}, 
                       {"        /  .'                     "},
                       {"        `-'                       "},
                     };
  
  char spaces[100];
  for(int i=0; i<=88; i++)
  { strcpy(spaces+i, " ");

    for(int j=0; j<11; j++)
    { cout << spaces;
      cout << plane[j] << "\n";
    }

    cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";    
    cout << "         _                             \n";
    cout << "        / \\                            \n";
    cout << "       /___\\                           \n";
    cout << "       [|||]                           \n";
    cout << "       [___]                           \n";
    cout << "       }-=-{                           \n";
    cout << "       |-\" |                           \n";
    cout << "       |.-\"|                p          \n";
    cout << "~^=~^~-|_.-|~^-~^~ ~^~ -^~^~|\\ ~^-~^~- \n";
    cout << "^   .=.| _.|__  ^       ~  /| \\        \n";
    cout << " ~ /:. \\\" _|_/\\    ~      /_|__\\  ^    \n";
    cout << ".-/::.  |   |\"\"|-._    ^   ~~~~        \n";
    cout << "  `===-'-----'\"\"`  '-.              ~  \n";
    cout << "                 __.-'      ^          \n";

    Sleep(40);
    system("CLS");
  }
  
  getch();
}

Friday, September 20, 2019

Train Animation in Dev C++

#include <windows.h>
#include <iostream.h>
#include <conio.h>

int main()
{ char train[][92] = { { "                                      (@@@)     (@@@@@)                " },
                       { "                               (@@)     (@@@@@@@)        (@@@@@@@)     " },
                       { "                         (@@@@@@@)   (@@@@@)       (@@@@@@@@@@@)       " },
                       { "                    (@@@)     (@@@@@@@)   (@@@@@@)             (@@@)   " },
                       { "               (@@@@@@)    (@@@@@@)                (@)                 " },
                       { "           (@@@)  (@@@@)           (@@)                                " },
                       { "        (@@)              (@@@)                                        " },
                       { "       .-.                                                             " },
                       { "       ] [    .-.      _    .-----.                                    " },
                       { "     .\"   \"\"\"\"   \"\"\"\"\"\" \"\"\"\"| .--`                      " },
                       { "    (:--:--:--:--:--:--:--:-| [___    .------------------------.       " },
                       { "     |C&O  :  :  :  :  :  : [_9_] |'='|.----------------------.|       " },
                       { "    /|.___________________________|___|'--.___.--.___.--.___.-'|       " },
                       { "   / ||_.--.______.--.______.--._ |---\\'--\\-.-/==\\-.-/==\\-.-/-'/-- " },
                       { "  /__;^=(==)======(==)======(==)=^~^^^ ^^^^(-)^^^^(-)^^^^(-)^^^        " },
                     };
  
  char spaces[50] = "                                                 ";
  for(int i=49; i>=0; i--)
  { spaces[i] = '\0';

    for(int j=0; j<15; j++)
    { cout << spaces;
      cout << train[j] << "\n";
    }
    cout << "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
    Sleep(40);
    system("CLS");
  }
  
  getch();
}