Made some changes and it works really good now.Thanks for the "return" advice.it was dumb of me.
Bytheway saw your cv,blown away by your achievements dude.Keep it up
hewre is the code,let me know if you can make it more simpler or compact than this .
Code:
#include<stdio.h>
main()
{
int x,y,z;
char b;
printf("Enter the value of x,y,z : ");
scanf("%d,%d,%d",&x,&y,&z);
shift(&x,&y,&z);
printf(" x = %d \n y= %d \n z = %d",x,y,z);
printf("\nDO you want right circular shift again?(y/n): ");
scanf(" %c",&b);
while ( b=='y')
{
shift(&x,&y,&z);
printf(" x = %d \n y= %d \n z = %d",x,y,z);
printf("\nDO you want right circular shift again?(y/n): ");
scanf(" %c",&b);
}
return 0;
}
shift(int *j,int *k,int *l)
{
int a;
a = *l;
*l = *k;
*k = *j;
*j = a;
}