Hi, I'm new at programming, and this is my first time doing arrays...i don't know what the problem with this code is. And where should i ask for the user input of the lines?

Write a program to see if two lines from users are equivalent. They
are considered equivalent if they use the same letters, case insensitive.
The number of times a letter appears is NOT important. So AABCC is
equivalent to cbba because they both use the letters a,b, and c. Beware,
there may be spaces in the line.


#include <stdio.h>

int main() {

int a[26], b[26], i,is_same;
char ch;
for(i=0; i<26; i++){
a[i]=0;
b[i]=0;
}

do{
printf("Input a line of letters: ");
scanf("%c", &ch);
if(ch>='a'&&ch<='z')
a[ch-'a']=1;

if(ch>='A'&&ch<='Z')
a[ch-'A']=1;
}while(ch!='\n');

do{
printf("Input a line of letters: ");
scanf("%c", &ch);
if(ch>='a'&&ch<='z')
b[ch-'a']=1;

if(ch>='A'&&ch<='z')
b[ch-'B']=1;
}while(ch!='\n');

is_same=1;
for(i=0;i<=26;i++)
if(a[i]!=b[i])
is_same=0;
if(is_same==0)
printf("Not same");
else
printf("Same");

return 0;

}
Code:
http://cboard.cprogramming.com/forumdisplay.php?s=&forumid=4