fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. float a[10], b[10];
  5. int back = 0, max = 10, i;
  6. printf("Write ten arguments:");
  7. for(int i = 0; i < max; i++) {
  8. printf("%d :", i + 1);
  9. scanf("%f", &a[i]);
  10. }
  11. printf("b");
  12. for(int i = max; i >= 0; i--) {
  13. back++;
  14. b[back] = a[i];
  15. }
  16. printf("a");
  17. for(int i = 0; i < max; i++) {
  18. printf("%f", b[i]);
  19. }
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 9416KB
stdin
1 2 3 4 5 6 7 8 9
stdout
Write ten arguments:1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :ba8222751744.0000008222752256.0000000.0000009.0000008.0000007.0000006.0000005.0000004.0000003.000000