Skip to content

Instantly share code, notes, and snippets.

View tornikegomareli's full-sized avatar

Tornike Gomareli tornikegomareli

View GitHub Profile
const int buttonPin = 5; // button
const int motorPin = 10; // motor
const int impulsePin = 7; // impulse
boolean switch_on = false;
int buttonState = 0; // variable for listening button
int impulseState = 0; // varaible for listening impulse
int counter = 0;
@tornikegomareli
tornikegomareli / Sorting_Algorithms
Created April 4, 2017 08:57
Selection and Bubble Sort Analyze and Time comparison in C/C++
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
int main()
{
@tornikegomareli
tornikegomareli / HumanClass
Created April 5, 2017 17:28
OOP First Lesson _ Human Class Initialization #165
#include <iostream>
#include <string>
using namespace std;
struct Data
{
string Name;
string LastName;
@tornikegomareli
tornikegomareli / Bubble vs Selection
Created April 7, 2017 17:40
Bubble Sort vs Selection Sort Competition #165
#include <iostream>
#include <time.h>
#include <stdlib.h>
#include <Windows.h>
#include <conio.h>
using namespace std;
void Rand(int Array[], const int Size)
{
@tornikegomareli
tornikegomareli / Change Number in Array
Created April 10, 2017 16:15
3. დაწერეთ პროგრამა რომელიც 50 ელემენტიან მასივს შეავსებს რენდომ რიცხვებით. შეეკითხება მომხმარებელს ელემენტს, შემდეგ მოძებნის ამ ელემენტს Binary Search ალგორითმის მიხედვით და ჩასვავს სხვა ელემენტს მითითებულ ინდექსზე.
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
void Init(int Arr[], int Size)
{
for (int i = 0; i < Size; i++)
{
@tornikegomareli
tornikegomareli / recursive_factorial_search
Created April 10, 2017 16:53
Search Factorial with recursive function #165
@tornikegomareli
tornikegomareli / Inheritance
Created April 10, 2017 17:54
Student and Facultys Class inheritance Implementation
#include <iostream>
#include <stdlib.h>
#include <time.h>
#include <string>
using namespace std;
class Student
{
@tornikegomareli
tornikegomareli / Students_Scores
Created April 11, 2017 17:49
დასამთავრებელია სტუდენტების ჯგუფი #165
#include <iostream>
#include <string>
using namespace std;
class student
{
private:
@tornikegomareli
tornikegomareli / Copy_Constructor
Created April 12, 2017 17:56
How Copy Constructor works and Why we need it
#include <string>
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
class Person
{
private:
@tornikegomareli
tornikegomareli / Async callback functions in C++
Created April 18, 2017 17:14
Async function call in C++ with future library
// async example
#include <iostream>
#include <future>
using namespace std;
void Init(int Array[], int Size)
{