Răspuns :
Răspuns:
1+2+3+4+5+6+7+8+9+10
(1+9)+(2+8)+(3+7)+(4+6)+5+10
10+10+10+10+15=55
sper ca este corect
int a=1,x,s=0;
cin>>x;
cout<while(a>0)
{cin>>a;
if(a==x) s++;}
cout<cred^^
cin>>x;
cout<while(a>0)
{cin>>a;
if(a==x) s++;}
cout<cred^^