Advertisement
Guest User

mock.c

a guest
Nov 14th, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <time.h>
  5. #include <ctype.h>
  6.  
  7. int main(void) {
  8. srand(time(0));
  9. char asd[10000];
  10. fgets(asd, 10000, stdin);
  11. const size_t len = strlen(asd);
  12. for(int i = 0; i < len; i++)
  13. {
  14. asd[i] = tolower(asd[i]);
  15. }
  16. for(int i = 0; i < 10000; i++)
  17. {
  18. int random = rand() % 3;
  19. if(random + i < 10000)
  20. {
  21. asd[i + random] = toupper(asd[i+random]);
  22. }
  23. else
  24. {
  25. break;
  26. }
  27. }
  28. puts(asd);
  29. return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement