View Code of Problem 79

#include <stdio.h>
int main()
{
	int i,n,m,a[10];
  	scanf("%d",&n);
  	for(i=0;i<n;++i)
          scanf("%d",&a[i]);
  	scanf("%d",&m);
  	for(i=n-m;i<n;++i)
          printf("%d ",a[i]);
  	for(i=0;i<n-m-1;++i)
          printf("%d "a[i]);
  	printf("%d",a[n-m-1]);
  	
  	
 
 
 
 
}
/*
Main.c: In function 'main':
Main.c:12:23: error: expected ')' before 'a'
           printf("%d "a[i]);
                       ^
Main.c:12:23: warning: format '%d' expects a matching 'int' argument [-Wformat=]
*/

Double click to view unformatted code.


Back to problem 79