how to write a program to enter a string and count the number of words whose first letter is 'a'
this is what i got...
#include<iostream.h>
#include<ctype.h>
#include <string.h>
# include <stdio.h>
void main ()
{
char str[60];
int
cout<<"enter string";
gets (str);
int n=strlen (str)
for (int i=0;i<n;i++)
if (is space (str[i])
{
if (str[i+1]=='a'|| str[i]=='A')
a++
}
break;
cout<<"/n no of words starting with a"<<a;
}