#include
using namespace std;
int main()
{
int a[20],i,n,p,ans=0,q;
cout<<“Enter the limit”;
cin>>n;
cout<<“Enter binary no.”;
for(i=0;i<n;i++){
cin>>a[i];
}
p=1;
for(i=0;i<n;i++)
{
q=a[i]%10;
ans=ans+(qp);
p=p2;
a[i]=a[i]/10;
}
for(i=0;i<n;i++){
cout<<“binary no.”<<ans;
}
return 0;
}
i want to solve through array but i didn’t find my solution
this is my code but i did not understand how to give multiple output.
but i solve this question from using string.