Hi, this C program is to remove duplicates. HOwever it doesnt always print out a result and when it does it screws it up sometimes.
# include <stdio.h>
# include "simpio.h"
# include "genlib.h"
main()
{
int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,word;
word=getchar();
a='a';
b='b';
c='c';
d='d';
e='e';
f='f';
g='g';
h='h';
i='i';
j='j';
k='k';
l='l';
m='m';
n='n';
o='o';
p='p';
q='q';
r='r';
s='s';
t='t';
u='u';
v='v';
w='w';
x='x';
y='y';
z='z';
while((word=getchar())!=EOF)
{
if(word==a)
{
printf("a");
a=1234;
}
else
if(word==b)
{
printf("b");
b=1234;
}
else
if(word==c)
{
printf("c");
c=1234;
}
else
if(word==d)
{
printf("d");
d=1234;
}
else
if(word==e)
{
printf("e");
e=1234;
}
else
if(word==f)
{
printf("f");
f=1234;
}
else
if(word==g)
{
printf("g");
g=1234;
}
else
if(word==h)
{
printf("h");
h=1234;
}
else
if(word==i)
{
printf("i");
i=1234;
}
else
if(word==j)
{
printf("j");
j=1234;
}
else
if(word==k)
{
printf("k");
k=1234;
}
else
if(word==l)
{
printf("l");
l=1234;
}
else
if(word==m)
{
printf("m");
m=1234;
}
else
if(word==n)
{
printf("n");
n=1234;
}
else
if(word==o)
{
printf("o");
o=1234;
}
else
if(word==p)
{
printf("p");
p=1234;
}
else
if(word==q)
{
printf("q");
q=1234;
}
else
if(word==r)
{
printf("r");
r=1234;
}
else
if(word==s)
{
printf("s");
s=1234;
}
else
if(word==t)
{
printf("t");
t=1234;
}
else
if(word==u)
{
printf("u");
u=1234;
}
else
if(word==v)
{
printf("v");
v=1234;
}
else
if(word==w)
{
printf("w");
w=1234;
}
else
if(word==x)
{
printf("x");
x=1234;
}
else
if(word==y)
{
printf("y");
y=1234;
}
else
if(word==z)
{
printf("z");
z=1234;
}
}
getchar();
}