Posts

Showing posts from December 23, 2018

Assignment

please change karna Q1 #include<iostream> using namespace std; int main() { int a[5],b[5],s[5],k; cout<<"Enter an elemenntL"; for(k=0;k<5;k++) cin>>a[k]; cout<<"Enter an elemenntL"; for(k=0;k<5;k++) cin>>b[k]; for(k=0;k<5;k++) s[k]=a[k]+b[k]; cout<<"M1"; for(k=0;k<5;k++) cout<<a[k]<<" "; cout<<"M2"; for(k=0;k<5;k++) cout<<b[k]<<" "; cout<<"Sum"; for(k=0;k<5;k++) cout<<s[k]<<" "; } q2 #include<iostream> using namespace std; int main() { int a[5],k; cout<<"Enter an elemenntL"; for(k=0;k<5;k++) { cin>>a[k]; } for(k=0;k<5;k++) { cout<<a[k]<<" "; } } q3 #include<iostream> using namespace std; int main() { int a[3][3],b[3][3],i,j; cout<<"Enter an el...