Advertisement
Guest User

Untitled

a guest
Apr 26th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main(){
  6. int Cantidad,A,X;
  7. char Nombre[100][51];
  8. printf("Ingresé la cantidad de alumnos presentes: "); scanf("%d",&Cantidad);
  9. for(X=0;X<Cantidad;X++){
  10. printf("Ingrese el nombre del alumno/a: "); scanf("%s", Nombre[X]); fflush(stdin);
  11. }
  12. srand(time(NULL));
  13. A=rand()%(Cantidad);
  14. printf ("El que limpia se llama: %s\n",Nombre[A]);
  15. return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement