martes, 5 de noviembre de 2019

Ejercicio 5

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <time.h>
#include <windows.h>
using namespace std;

void gotoxy(int x,int y){
HANDLE hcon;
hcon=GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwPos;
dwPos.X=x;
dwPos.Y=y;
SetConsoleCursorPosition(hcon,dwPos);
}

int main(){
system("color F0");
int randi;
srand(time(NULL));
for(int i=0; i<=29; i++){
randi=rand()/1000;
if(randi>20){
cout<<randi<<endl;
}
}
system("pause");
for(int i=1; i<=1; i++){
gotoxy(36,i);
for(int i=0; i<=0; i++){
cout<<"B";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"r";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"b";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<" ";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"M";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"e";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"d";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"i";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"n";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<" ";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"C";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"a";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"r";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"l";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"o";
Sleep(100);
}
for(int i=0; i<=0; i++){
cout<<"s ";
Sleep(100);
}
}
cout<<endl;
system("pause");
system("cls");
}

No hay comentarios:

Publicar un comentario