Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4. #include <time.h>
  5. #include <windows.h>
  6.  
  7. int tablica(float x, float y)
  8. {
  9. char tab[40][80];
  10. int i,j;
  11.  
  12. for(i=1;i<=20;i++)
  13. {
  14. for(j=1;j<=20;j++)
  15. {
  16.  
  17.  
  18. if(x==i && y==j)
  19. tab[i][j]='*';
  20. else
  21. {
  22. tab[i][j]=' ';
  23. printf("%c",tab[i][j]);
  24. if(j==20)
  25. printf("\n");
  26. }
  27.  
  28.  
  29. }
  30. }
  31. }
  32.  
  33.  
  34. int main()
  35. {
  36.  
  37. int i,j;
  38.  
  39. for(i=1; i=20;i++)
  40. for(j=1; j<=20;j++)
  41. {
  42. tablica(i,j);
  43. system( "cls" );
  44. Sleep(100);
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement