I'm making a program that prompts for and reads two characters from the keyboard, one at a time, from the user. The program will print all ASCII letters from the first to the last letter entered, inclusive. I have loop working now thanks to Eric J. Although it outputs the entire list of ASCII letters numbers and symbols before finally showing me my desired string of letters.
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
char charone, chartwo, curr;
curr = charone;
printf("Enter the first character:");
scanf(" %c", &charone);
printf("Enter the last character: ");
scanf(" %c", &chartwo);
while(curr <= chartwo) {
printf("Your character is %c\n", curr++);
}
system("PAUSE");
return 0;
}