fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(void) {
  5. // your code goes here
  6. char msg[30];
  7. int x =1, i=0;
  8. double d[10];
  9. for(i =0; i<10; i++)
  10. d[i] = i+10.0L;
  11. sprintf(msg, "%d ",x);
  12. for(i =0; i<10; i++){
  13. sprintf(msg + strlen(msg),"%lf ", d[i]);
  14. }
  15.  
  16. printf("%s\n", msg);
  17. return 0;
  18. }
  19.  
Success #stdin #stdout 0s 9424KB
stdin
Standard input is empty
stdout
1 10.000000 11.000000 12.000000 13.000000 14.000000 15.000000 16.000000 17.000000 18.000000 19.000000