Advertisement
Guest User

Untitled

a guest
Nov 20th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.55 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4.  
  5. main()
  6.  
  7. {
  8.  
  9. int a=0,b=50, c=51, d=101, e=102, f=152, g=153, h=203, j=204, k=254, q=0;
  10. char x=' ',y=' ',z=' ', t=' ',v=' ';
  11.  
  12. printf("\t\t\t\t\ \311\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\273\n"); // Atvaizduoja Ascii table viršutinį sluoksnį.
  13. printf("\t\t\t\t\ \272 My program to draw the ASCII table: \272\n"); //Atvaizduoja Ascii table užrašą ir kraštines.
  14.  
  15. printf("\t\t\t\t\ \310\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\315\274\n");// Atvaizduoja Ascii table apatinį sluoksnį.
  16.  
  17. printf("\n\n\ \333\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\333\n"); // Atvaizduoja (1) simbolių sluoksnį
  18. printf("\ \333\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\333\n"); // Atvaizduoja (2) simbolių sluoksnį
  19. printf(" \333 Dec Hx Oct Char \333 Dec Hx Oct Char \333 Dec Hx Oct Char \333 Dec Hx Oct Char \333 Dec Hx Oct Char \333 \n"); // Atvaizduoja lentelės pavadinimus Dec, Hx, Oct,Char
  20. printf(" \333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\n"); // Atvaizduojamas simbolių sluoksnis (3) po Dec Hx Oct Char pavadinimų
  21. printf(" \333\ \334\337\334\337\334\337\334\337\334\337\334\337\334\337\334\337\334\ \333\ \334\337\334\337\334\337\334\337\334\337\334\337\334\337\334\ \ \333\ \ \334\337\334\337\334\337\334\337\334\337\334\337\334\337\334\ \ \333\ \ \334\337\334\337\334\337\334\337\334\337\334\337\334\337\334\ \ \333\ \ \334\337\334\337\334\337\334\337\334\337\334\337\334\337\334\ \333\n"); // Atvaizduojamas simbolių sluoksnis (4) po Dec Hx Oct Char pavadinimų
  22. printf(" \333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\376\333\n"); // Atvaizduojamas simbolių sluoksnis (5) po Dec Hx Oct Char pavadinimų
  23.  
  24. for(;a<=b, c<=d, e<=f, g<=h, j<=k, q<=50; a++, c++, e++, g++, j++, q++) // Sukuria lentelės simbolius nuo 0 iki 50, nuo 51 iki 101, nuo 102 iki 152, nuo 153 iki 203, nuo 204 iki 254
  25. {
  26. if(q==0) {x='N';y='U';z='L';t=' '; v=' ';} // Atvaizduoja pirmo stulepio char simbolius nuo 1 iki 32
  27. else if(q==1) {x='S';y='O';z='H';}
  28. else if(q==2) {x='S',y='T',z='X';}
  29. else if(q==3) {x='E',y='T',z='X';}
  30. else if(q==4) {x='E',y='O',z='T';}
  31. else if(q==5) {x='E',y='N',z='Q';}
  32. else if(q==6) {x='A',y='C',z='K';}
  33. else if(q==7) {x='B',y='E',z='L';}
  34. else if(q==8) {x='B',y='S',z=' ';}
  35. else if(q==9) {x='T',y='A',z='B';}
  36. else if(q==10) {x='L',y='F',z=' ';}
  37. else if(q==11) {x='V',y='T',z=' ';}
  38. else if(q==12) {x='F',y='F',z=' ';}
  39. else if(q==13) {x='C',y='R',z=' ';}
  40. else if(q==14) {x='S',y='O',z=' ';}
  41. else if(q==15) {x='S',y='I',z=' ';}
  42. else if(q==16) {x='D',y='L',z='E';}
  43. else if(q==17) {x='D',y='C',z='1';}
  44. else if(q==18) {x='D',y='C',z='2';}
  45. else if(q==19) {x='D',y='C',z='3';}
  46. else if(q==20) {x='D',y='C',z='4';}
  47. else if(q==21) {x='N',y='A',z='K';}
  48. else if(q==22) {x='S',y='Y',z='N';}
  49. else if(q==23) {x='E',y='T',z='B';}
  50. else if(q==24) {x='C',y='A',z='N';}
  51. else if(q==25) {x='E',y='M',z=' ';}
  52. else if(q==26) {x='S',y='U',z='B';}
  53. else if(q==27) {x='E',y='S',z='C';}
  54. else if(q==28) {x='F',y='S',z=' ';}
  55. else if(q==29) {x='G',y='S',z=' ';}
  56. else if(q==30) {x='R',y='S',z=' ';}
  57. else if(q==31) {x='U',y='O',z=' ';}
  58. else if(q==32) {x='S',y='p', z='a', t='c', v='e';}
  59. else {x=q;y=' '; z=' '; t=' ', v=' ';}
  60.  
  61. printf(" \333 %3d %3x %03o %c%c%c%c%c \333\ ",a,a,a,x,y,z,t,v); // Atvaizduoja pirmą stuleplį
  62. printf("%3d %3x %03o %3c \333\ ",c,c,c,c); // Atvaizduoja antrą stuleplį
  63. printf("%3d %3x %03o %3c \333\ ",e,e,e,e); // Atvaizduoja trecią stuleplį
  64. printf("%3d %3x %03o %3c \333\ ",g,g,g,g); // Atvaizduoja ketvirtą stuleplį
  65. printf("%3d %3x %03o %3c \333\ ",j,j,j,j); // Atvaizduoja penktą stuleplį
  66.  
  67. if(a%1==0) printf("\n"); // Sulygiuoja stuleplius
  68.  
  69.  
  70.  
  71. }
  72. {
  73. printf(" \333\ \333\ \333\ \333\ \333\ 255 ff 377 \333\n"); // Atvaizduoja 255 lentelės eilutę ir nubraižo lentelės linijas
  74. printf("\ \333\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\333\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\333\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\333\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\333\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\333\n"); // Atvaizduoja lentelės priešpaskutinę simbolių eilutę.
  75. printf(" \333\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\337\334\333\334\337\333\333\n"); //Atvaizduoja lentelės paskutinę simbolių eilutę.
  76.  
  77. printf("\n\n");
  78. printf(" \334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\n");// Atvaizduoja 2-osios lentelės viršutinę dalį.
  79. printf(" \333\ NUL - (null) \333\n"); // Atvaizduoja simbolio paaiškinimą nuo 1 iki 31.
  80. printf(" \333\ SOH - (start of heading) \333\n");
  81. printf(" \333\ STX - (start of text) \333\n");
  82. printf(" \333\ ETX - (end of text) \333\n");
  83. printf(" \333\ EOT - (end of transmission) \333\n");
  84. printf(" \333\ ENQ - (enquiry) \333\n");
  85. printf(" \333\ ACK - (acknowledge) \333\n");
  86. printf(" \333\ BEL - (bell) \333\n");
  87. printf(" \333\ BS - (backspace) \333\n");
  88. printf(" \333\ TAB - (horizontol tab) \333\n");
  89. printf(" \333\ LF - (NL line feed, new line) \333\n");
  90. printf(" \333\ VT - (vertical tab) \333\n");
  91. printf(" \333\ FF - (NP form feed, new page) \333\n");
  92. printf(" \333\ CR - (carriage return) \333\n");
  93. printf(" \333\ S0 - (shift out) \333\n");
  94. printf(" \333\ SI - (shift in) \333\n");
  95. printf(" \333\ DLE - (data link escape) \333\n");
  96. printf(" \333\ DC1 - (device control 1) \333\n");
  97. printf(" \333\ DC2 - (device control 2) \333\n");
  98. printf(" \333\ DC3 - (device control 3) \333\n");
  99. printf(" \333\ DC4 - (device control 4) \333\n");
  100. printf(" \333\ NAK - (negative acknowledge) \333\n");
  101. printf(" \333\ SYN - (synchronus idle) \333\n");
  102. printf(" \333\ ETB - (end of trans. block) \333\n");
  103. printf(" \333\ CAN - (cancel) \333\n");
  104. printf(" \333\ EM - (end of medium) \333\n");
  105. printf(" \333\ SUB - (substitue) \333\n");
  106. printf(" \333\ ESC - (escape) \333\n");
  107. printf(" \333\ FS - (file separator) \333\n");
  108. printf(" \333\ GS - (group separator) \333\n");
  109. printf(" \333\ RS - (record separator \333\n");
  110. printf(" \333\ US - (unit separator) \333\n");
  111. printf(" \333\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\334\333\n");// Atvaizduoja 2-osios lentelės apatinę dalį.
  112.  
  113. }
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement