ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Maquina de TUring c++ INTENTO


Enviado por   •  10 de Enero de 2020  •  Tareas  •  1.183 Palabras (5 Páginas)  •  128 Visitas

Página 1 de 5

#include <Windows.h>

#include <string>

using namespace std;

void gotoxy(int x, int y) {//Ancho =80 Alto=25

HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE);

COORD dwPos;

dwPos.X = x;

dwPos.Y = y;

SetConsoleCursorPosition(hcon, dwPos);

}

void TextoXY(int x, int y, string texto){

gotoxy(x, y);

cout << texto; //<< "\n";

}

void InforCurso(int Size, bool Visible) {

HANDLE hcon = GetStdHandle(STD_OUTPUT_HANDLE);

CONSOLE_CURSOR_INFO cci;

cci.dwSize = Size;

cci.bVisible = Visible;

SetConsoleCursorInfo(hcon, &cci);

}

void LineaHorizontal(int Hx1, int Hx2, int Hy){

for (int x = Hx1; x <= Hx2; x++)

{

gotoxy(x, Hy);

cout << "-";

}

}

void LineaVertical(int Vx, int Vy1, int Vy2){

for (int y = Vy1; y <= Vy2; y++)

{

gotoxy(Vx, y);

cout << "|";

}

}

void Texto2(int x, int y, char numero){

gotoxy(x, y);

cout << numero; //<< "\n";

}

void Rectangulo(int x1, int y1, int x2, int y2){

LineaHorizontal(x1 + 1, x2 - 1, y1);

LineaHorizontal(x1 + 1, x2 - 1, y2);

LineaVertical(x1, y1 + 1, y2 - 1);

LineaVertical(x2, y1 + 1, y2 - 1);

Texto2(x1, y1, '+');

Texto2(x1, y2, '+');

Texto2(x2, y1, '+');

Texto2(x2, y2, '+');

}

void Rectangulo_limpia(int x1,int y2,int XSixe, int YSixe){

string espacio="";

espacio.append(XSixe,' ');

for(int y=0;y<YSixe;y++){

gotoxy(x1,y2+y);

cout<<espacio;

}

}

void LogError(int x7 , int y7){

TextoXY(x7, y7 , " __________________ ___________ ");

TextoXY(x7, y7+1 , "_/ __ \\_ __ \\_ __ \\/ _ \\_ __ \\");

TextoXY(x7, y7+2 , "\\ ___/| | \\/| | \\( <_> ) | \\/");

TextoXY(x7, y7+3 , " \\___ >__| |__| \\____/|__| ");

TextoXY(x7, y7+4 , " \\/ ");

}

void LogDone(int x7 , int y7){

TextoXY(x7, y7 , " .___ ");

TextoXY(x7, y7+1 , " __| _/____ ____ ____ ");

TextoXY(x7, y7+2 , " / __ |/ _ \\ / \\_/ __ \\ ");

TextoXY(x7, y7+3 , "/ /_/ ( <_> ) | \\ ___/ ");

TextoXY(x7, y7+4 , "\\____ |\\____/|___| /\\___ >");

TextoXY(x7, y7+5 , " \\/ \\/ \\/");

}

void LOGO(int x6, int y6) {

TextoXY(x6, y6, " __ __ ");

TextoXY(x6, y6 + 1, "| |__ ____ _____ ____ | | __________________ ");

TextoXY(x6, y6 + 2, "| | \\ / _ \\ / \\ / _ \\| |/ / _ \\_ __ \\__ \\ ");

TextoXY(x6, y6 + 3, "| Y ( <_> ) Y Y ( <_> ) ( <_> ) | \\// __ \\_");

TextoXY(x6, y6 + 4, "|___| /\\____/|__|_| /\\____/|__|_ \\____/|__| (____ /");

TextoXY(x6, y6 + 5, " \\/ \\/ \\/ \\/ ");

}

//Maquina de Turing

#include <iostream>

#include <conio.h>

#include <stdlib.h>

#include <string.h>

#include <fstream>

/////////////////////////

/////////////////////////

#define Izquierda 75

#define Derecha 77

#define Arriba 72

#define Abajo 80

#define Espacio 32

///////////////////////

using namespace std;

///////STRUCT////////////////////////////////////

struct Condicion{

Condicion *siguiente;

string inserccion;

...

Descargar como (para miembros actualizados)  txt (19.9 Kb)   pdf (72.4 Kb)   docx (26.9 Kb)  
Leer 4 páginas más »
Disponible sólo en Clubensayos.com