Check these codes plzz | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 2

Check these codes plzz

#include <iostream> using namespace std; int main(){ int arr[7] = {43,13,4,57,98,156}; int sum=0,indexPos=1; for(int x=0;x<6;x++){ sum += arr[x]; } cout <<"Sum of all elements : "<<sum<<endl; for(int x=5;x>=1;x--){ arr[x+1] = arr[x]; } cout<<"\nAfter insertion\n"; arr[1] = 73; for(int x=0;x<7;x++){ cout<<arr[x]<<" "; } sum = 0; for(int x=0;x<7;x++){ sum += arr[x]; } cout <<"\n\nSum of all elements After insertion : "<<sum<<endl; cout<<"\nDelete 13 from list:\n"; for(int x=2;x<6;x++){ arr[x] = arr[x+1]; } arr[6]=0; cout<<"After Deletion\n"; arr[1] = 73; for(int x=0;x<6;x++){ cout<<arr[x]<<" "; } sum = 0; for(int x=0;x<6;x++){ sum += arr[x]; } cout <<"\n\nSum of all elements After insertion : "<<sum<<endl; cout<<"\nAfter Update\n"; arr[3] = 84; for(int x=0;x<6;x++){ cout<<arr[x]<<" "; } }

5th Dec 2020, 8:58 AM
Shabab ā€œBassam
Shabab ā€œBassam - avatar
2 Respostas
+ 7
Its working fine
5th Dec 2020, 9:16 AM
惄SampriyašŸ˜˜ćƒ„
惄SampriyašŸ˜˜ćƒ„ - avatar
+ 1
What you want the code to do? What is the problem? Need these details before going further. Please also save the code in SoloLearn, then replace the raw text code with saved code link, it's easier to work with. Just follow the below guide to share the saved code link šŸ‘ https://www.sololearn.com/post/75089/?ref=app
5th Dec 2020, 9:20 AM
Ipang