fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int n,k;
  5. cin>>n;
  6. int a[n];
  7. for(int i=0;i<n;i++){
  8. cin>>a[i];
  9. }
  10. for(int i=0;i<n;i++){
  11. cin>>a[i];
  12. }
  13. cin>>k;
  14. for(int i=0;i<n;i++){
  15. cout<<a[(i+k)%n]<<endl;
  16. }
  17. // your code goes here
  18. return 0;
  19. }
  20.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
3
1 2 3
1
compilation info
prog.c: In function ‘main’:
prog.c:5:2: error: ‘cin’ undeclared (first use in this function)
  cin>>n;
  ^~~
prog.c:5:2: note: each undeclared identifier is reported only once for each function it appears in
prog.c:15:3: error: ‘cout’ undeclared (first use in this function)
   cout<<a[(i+k)%n]<<endl;
   ^~~~
prog.c:15:21: error: ‘endl’ undeclared (first use in this function)
   cout<<a[(i+k)%n]<<endl;
                     ^~~~
stdout
Standard output is empty