You are on page 1of 1

#include<stdio.

h>
int main()
{
int n; // input number from the user
int no; // input number of rotations
int d,a[5],i=0,j,tempo;
scanf("%d",&n);
scanf("%d",&no);
while(n>0&&i<5)
{
d=n%10;
n=n/10;
a[i]=d;
i++;
}
for (i=1;i<=no;i++)
{
for(j=1;j<5;j++)
{
tempo=a[0];
a[j]=a[j+1];
}
a[j]=tempo;
}
return 0;
}