Guest User

Untitled

a guest
Jun 19th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.66 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int a[6],i;
  5.     for(i=0;i<6;i++)
  6.     {
  7.                     printf("Enter integer:");
  8.                     scanf("%d", &a[i]);
  9.     }
  10.     intro();
  11.     shift(a,6);
  12.    
  13.     getch();
  14. }
  15.  
  16. intro()
  17. {
  18.      printf("Name:\n");
  19.      printf("Date:\n");
  20.      printf("Place:\n");
  21.      
  22. }
  23.  
  24. int shift(int a[6])
  25. {
  26.     int i,j,dummy;  
  27.     for(i=0;i<6;i++)
  28.     {
  29.                     for(j=0;j<6;j++)
  30.                     printf("%d\t", a[j]);
  31.                     printf("\n");
  32.                     dummy=a[0];
  33.                     for(j=0;j<5;j++)
  34.                     a[j]=a[j+1];
  35.                     a[5]=dummy;  
  36.     }
  37. }
Add Comment
Please, Sign In to add comment