Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main(){
- int Cantidad,A,X;
- char Nombre[100][51];
- printf("Ingresé la cantidad de alumnos presentes: "); scanf("%d",&Cantidad);
- for(X=0;X<Cantidad;X++){
- printf("Ingrese el nombre del alumno/a: "); scanf("%s", Nombre[X]); fflush(stdin);
- }
- srand(time(NULL));
- A=rand()%(Cantidad);
- printf ("El que limpia se llama: %s\n",Nombre[A]);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement