fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x[10] = { 0 };
  5. int i;
  6.  
  7. for(i=0;i<10;i++){
  8. if(i == 0){
  9. scanf("%d\n", &x[i]);
  10. printf("%d\n", x[i]);
  11. }
  12. else if(i == 9){
  13. scanf("%d\n", &x[i]);
  14. printf("%d\n", x[i]);
  15. }
  16.  
  17. else{
  18. printf("%d\n", x[i]);
  19. }
  20. }
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0.01s 5272KB
stdin
3
5
stdout
3
0
0
0
0
0
0
0
0
5