下列程序的輸出結(jié)果是______。 include<iostream.h>void main(){ char a[]="abcdabcabfgacd"; in
下列程序的輸出結(jié)果是______。
include<iostream.h>
void main()
{
char a[]="abcdabcabfgacd";
int i1=0,i2=0,i=0;
while(a[i])
{
if(a[i]=="a")i1++;
if(a[i]=="b")i2++;
i++;
}
cout<<i1<<""<<i2<<endl;
}