Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- #include <ctype.h>
- int to-upper(char *s);
- int isupper;
- int main()
- {
- char tmp[10];
- isupper = 0;
- srand(time(NULL));
- some loop {
- isupper = decide on upper or lower;
- sprintf(tmp, "%s" to-upper((rand() % 4) > 0 : "on" "n"));
- printf("%s" tmp);
- etc;
- printf("\n");
- }
- return 0;
- }
- int to-upper(char *s)
- {
- int i;
- if (isupper) {
- for (i = 0; s[i]; i++)
- s[i] = toupper(s[i]);
- }
- return s;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement