La Frase

lunes, 20 de octubre de 2008

Outputs locos...

Como nos estamos iniciando en C, no faltan los ratos de ocio y por ende he aquí algunos algoritmos simples 100% compilables en DEV-CPP...

Pueden analizarlos, modificarlos y comentar sus creaciones...en algunos casos la librería estándar está entre comillas...borren esas comillas antes de "copy/pastear" los programas.....

Tipo Matrix:

"Lluvia Binaria":

#include<stdio.h>
#include<stdlib.h>
#include<time.h>

int main()
..............{

...............system("color a");
...............srand((unsigned) time(0));
...............int numero, i=0;

...............while(i<=1)
......................{
.......................numero=(rand()%2);

.......................printf("%d",numero);
......................}
..............}

Salida:



Conoce una forma inusual de ver los caracteres de C:

"Loading":

#include<"stdio.h">
#include<"stdlib.h">

main()
.........{

..........int i,car;
..........system("color a");

..........for(i=1;i<=100;i++)
.............{
..............printf("\t\t\t CARGANDO CARACTERES %d%c",i,37);
..............system("cls");

.............}

.........i=0;
.........car=1;

.........while(i<=1)

................{
.................system("color a");
.................printf("%c ",car);
.................system("color 00");
.................system("color 10");
.................system("color 20");
.................system("color 30");

.................system("color 40");
.................system("color 50");
.................system("color 60");
.................system("color 70");
.................system("color 80");
.................system("color 90");


.........car++;
................}
.........}

Salida:


Esto ya no sé lo que es:

"¿¿¿???"

#include <"stdio.h">

#include <stdlib.h>

main()
.........{
..........system("color a");

..........int i;

..........for(i=0;i<9999999;i++)>
.............{
..............printf("%c%f%d%c%c%f%d%c%c%f%d%c%c%f%d%c \n",i);
.............}
.........}


Salida:


Despierta con este algoritmo:

"Alarma":

#include<"stdio.h">
#include<stdlib.h>

main()
.........{
..........int i;

..........i=0;
..........system("color c");

..........while(i<=1)

.................{
..................printf("SYSTEM FAILURE SYSTEM FAILURE SYSTEM FAILURE ..................SYSTEM FAILURE SYSTEM FAILURE \a");
.................}
.........}

Salida:




No hay comentarios: