Design a program with the following specifications:
Prompt the user for an alphabet.
Continue to prompt until a valid alphabet has been entered.
Starting with the user inputted alphabet, print every alphabet up to and including ‘z’ or ‘Z’
For example:
User enters ‘Q’: QRSTUVWXYZ
User enters ‘s’: stuvwxyz
so far I have, any help would be appreciated.
Code:
#include <stdio.h>
#define CHARACTER 26 // max size of array
char printstring (char str[]);//prototype
int main(void)
{
char i[CHARACTER];
printf("Please enter a capital or lowercase letter:");
printstring (i);
printf("%c",i);
return (0);
}
char printstring (char str[]);
{
return str;
scanf("%c", str);
for(i='a';i<='z';i++){printf("%s",i);}
for(i='A';i<='Z';i++){printf("%s",i);}
getch();
}
//if(string[i]>='a' && string[i]<='z') word++;
//if(string[i]>='A' && string[i]<='Z') word++;