#include <stdio.h>
int main(void)
{
char ch;
//character = ch
printf("Please type a character [A-Z or a-z] ('x'to exit):");
scanf("%c", &ch);
switch(ch) //switch statement
{
case 'a':
printf("%c is a vowel.\n", ch);
break;
case 'e':
printf("%c is a vowel.\n", ch);
break;
case 'i':
printf("%c is a vowel.\n", ch);
break;
case 'o':
printf("%c is a vowel.\n", ch);
break;
case 'u':
printf("%c is a vowel.\n", ch);
break;
case 'A':
printf("%c is a vowel.\n", ch);
break;
case 'E':
printf("%c is a vowel.\n", ch); …Run Code Online (Sandbox Code Playgroud) #include <stdio.h>
#include <stdlib.h>
#include <string.h>
char rand(char x);
int main()
{
char input[80] = {0};
char rando[80] = {0};
char choice = 0;
char rando2[80] = {0};
if(strlen(input) >= 10 && strlen(input) <= 80); {
printf("Please enter a string with 10-80 characters: ");
scanf("%s", input);
printf("Orginal string: %s\n", input);
rando = my_rand(input);
printf("New string: %s\n", rando); }
else{
return 0; }
printf("Would you like to shuffle this string again?(y or n): ");
scanf("%c\n", &choice);
if( choice == 'y') { …Run Code Online (Sandbox Code Playgroud)