Assuming the input is only having As and Bs,  this would do the trick.

bool isproper(char * str)
{
int counter=0;
while(*str) counter+=  ( (*(str++) ^  'B'  -1 );
return ! counter;
}

Melchi

On 7/12/05, Jayarajaganesh <[EMAIL PROTECTED]> wrote:
>  Hi,
>  i need a C or C++ program for a language that has
>  words in which the number of Bs is twice than the
>  number of As. I need a prog without much of counters
>  and less no of conditions like if
>  ganesh
>  
>  __________________________________________________
>  Do You Yahoo!?
>  Tired of spam?  Yahoo! Mail has the best spam protection around 
>  http://mail.yahoo.com 
>  
>  
>  
>  
>  ________________________________
>  YAHOO! GROUPS LINKS 
>  
>  
>  Visit your group "tech4all" on the web.
>   
>  To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>   
>  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
>  
>  ________________________________
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/tech4all/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to