Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a[6],i;
- for(i=0;i<6;i++)
- {
- printf("Enter integer:");
- scanf("%d", &a[i]);
- }
- intro();
- shift(a,6);
- getch();
- }
- intro()
- {
- printf("Name:\n");
- printf("Date:\n");
- printf("Place:\n");
- }
- int shift(int a[6])
- {
- int i,j,dummy;
- for(i=0;i<6;i++)
- {
- for(j=0;j<6;j++)
- printf("%d\t", a[j]);
- printf("\n");
- dummy=a[0];
- for(j=0;j<5;j++)
- a[j]=a[j+1];
- a[5]=dummy;
- }
- }
Add Comment
Please, Sign In to add comment