Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main()
- {
- int a[50],i,j,m,n,na,vr,pom1,pom2;
- scanf("%d%d",&n,&m);
- for (i=0;i<n;i++)
- scanf("%d",&a[i]);
- for (i=0;i<m;i++)
- {
- printf("\n Unesi indekst i vrednost");
- printf("\n");
- scanf("%d%d",&na,&vr);
- n=n+1;
- for (j=n-1;j>na;j--)
- a[j]=a[j-1];
- a[na]=vr;
- for (j=0;j<n;j++)
- printf("%d\t",a[j]);
- printf("\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement