Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctime>
- #include <conio.h>
- #define ALEATORIO(INI, FIN) rand() % (FIN - INI +1) + INI
- using namespace std;
- using namespace System;
- void mensaje(){
- while(true){
- srand(time(0));
- short longitud = ALEATORIO(20,30);
- char* letras = new char[longitud];
- for(int i=0; i<longitud, ++i){
- letras[i] = ALEATORIO(A,Z);
- }
- for(int i=0;i<longitud,++i){
- cout<<letras[i]<<"\t";
- }
- for(int i=0;i<longitud,++i){
- if(letras[i]==U && letras[i+1]==P && letras[i+2]==C){
- cout<<"ES UN ALUMNO";
- _getch();
- } else if(letra[i]==I && letras[i+2]==S && letras[i+4]==I){
- cout<<"ES UN ALUMNO DE SISTEMAS";
- _getch();
- }
- }
- }
- }
- int main(){
- mensaje();
- cout<<"hola";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement