Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
scemo le
//g++ 5.4.0 #include <iostream> using namespace std; typedef int Vettore[50]; int main() { Vettore V; int i,n,p,info; cin>> n; for(i=0;i<n;i++){ cin>> V[i]; } for(i=0;i<n;i++){ cout<< V[i]<<" "; } cout<<endl; cin>> p; // posizione nuovo elemento cin>> info; // nuovo elemento for (i=n-1;i>=p;i--){ V[i+1]=V[i]; V[p]=info; n++; } for(i=0;i<n;i++){ cout<< V[i]<<" "; } return 0; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
so
single_digit
copy_30-Seconds-of-C++
remove_copy-30-Seconds-of-C++
cppOverride
a simple tuple implementation
Building squares using smallest amount of matches
Identifying polimorphic types without using RTTI or type mappings
List add
Queue with Limited Size of Arrays
stackse - search stackoverflow differently
Please log in to post a comment.