# include <stdio.h>
# include <string.h>
# include <conio.h>
void main ()
{
char c;
//char let []= {"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"};
//printf ("%c",'d'-32);
//scanf ("%c",&c);
int word_cnt;
word_cnt=0;
c=getche ();
while (c!='#')
{
if (c!=32)
{
word_cnt=word_cnt+1;
c=getche ();
continue;
}
else
printf ("%d\n",word_cnt);
word_cnt=0;
c=getche ();
}
printf ("\n");
word_cnt=0;
puts ("END");
printf ("Enter a word ... ");
// c=getchar ();
scanf ("%c",&c);
//while (c!=13){
while (c>='a' && c<='z')//{
c=c-32;
//continue;}
printf("The result is: %c", c);
//putchar (c);
getchar ();
} |