How to code this Enter·the·first·character:·C
Enter·the·second·character:·U
C
.
.
.
U
#include <stdio.h>
int main(void) {
char character1,character2;
printf("Enter the first character: ");
character1 = getchar();
printf("Enter the second character: ");
character2 = getchar();
character2 = getchar();
while(character1<=character2)
{
printf("%c\n", character1);
character1++;
}
getchar();
getchar();
return 0;
}
Comments
Leave a comment