fork download
  1. #include <stdio.h>
  2. #include <time.h>
  3. char* Sym(int change)
  4. {
  5. if(change > 0)
  6. {
  7. printf("/");
  8. }
  9. else if (change == 0)
  10. {
  11. printf("-");
  12. }
  13. else
  14. {
  15. printf("\\");
  16. }
  17. }
  18.  
  19. void graph()
  20. {
  21. char* co[10][10];
  22. for(int x = 9; x >=0; --x)
  23. {
  24. srand(time(NULL));
  25. int r = rand();
  26. for(int y = 9; y >=0; --y)
  27. {
  28. co[x][y] = Sym(3);
  29. printf("%c", co[x][y]);
  30. }
  31. printf("\n");
  32. }
  33. }
  34. int main(void) {
  35. graph();
  36. return 0;
  37. }
  38.  
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
//////////
//////////
//////////
//////////
//////////
//////////
//////////
//////////
//////////
//////////