fork(1) download
  1. #include "Graphics.h"
  2. #include <conio.h>
  3. #include <Windows.h>
  4. #include <iostream>
  5. using namespace std;
  6. void sample1(int, int);
  7. void sample2(int, int);
  8. void sample3(int, int);
  9. void sample4(int, int);
  10. void drawing();
  11. void main(){
  12.  
  13. drawing();
  14. _getch();
  15. }
  16.  
  17. void drawing(){
  18. Graphics::fontsize(8, 8);
  19. Graphics::fullscreen();
  20. cout << "Please maximize the window and press any key to continue";
  21. _getch();
  22. system("cls");
  23. Graphics::clr(15);
  24. Graphics::square(2, 2, 89, 89);
  25. Graphics::clr(0);
  26.  
  27. Graphics::square(2, 2, 3, 3);
  28. Graphics::square(88, 88, 3, 3);
  29. Graphics::square(88, 2, 3, 3);
  30. Graphics::square(2, 88, 3, 3);
  31.  
  32. Graphics::clr(10);
  33.  
  34. Graphics::fsquare(3, 35, 87, 21);
  35. Graphics::fsquare(35, 3, 21, 87);
  36.  
  37. Graphics::clr(0);
  38.  
  39. Graphics::square(4, 36, 85, 19);
  40. Graphics::square(36, 4, 19, 85);
  41.  
  42. Graphics::clr(12);
  43.  
  44. for (int i = 0; i < 6; i++)
  45. {
  46. for (int j = 0; j < 3; j++)
  47. {
  48. Graphics::square(
  49. (i*6) + 5, (j*6) + 37,4,4
  50. );
  51. }
  52. }
  53.  
  54. Graphics::clr(11);
  55.  
  56. for (int i = 0; i < 3; i++)
  57. {
  58. for (int j = 0; j < 6; j++)
  59. {
  60. Graphics::square(
  61. (i * 6) + 38, (j * 6) + 5, 4, 4
  62. );
  63. }
  64. }
  65.  
  66. Graphics::clr(13);
  67.  
  68. for (int i = 0; i < 6; i++)
  69. {
  70. for (int j = 0; j < 3; j++)
  71. {
  72. Graphics::square(
  73. (i * 6) + 54, (j * 6) + 38, 4, 4
  74. );
  75. }
  76. }
  77.  
  78. Graphics::clr(10);
  79.  
  80. for (int i = 0; i < 3; i++)
  81. {
  82. for (int j = 0; j < 6; j++)
  83. {
  84. Graphics::square(
  85. (i * 6) + 38, (j * 6) + 54, 4, 4
  86. );
  87. }
  88. }
  89. Graphics::setColor(255, 255, 255);
  90.  
  91. Graphics::drawFillCircle(44, 44, 28);
  92. Graphics::drawFillCircle(700, 700, 28);
  93. Graphics::drawFillCircle(700, 45, 28);
  94. Graphics::drawFillCircle(45, 700, 28);
  95.  
  96. sample1(100, 100);
  97. sample1(200, 200);
  98. sample1(200, 100);
  99. sample1(100, 200);
  100.  
  101. sample2(540, 540);
  102. sample2(640, 640);
  103. sample2(640, 540);
  104. sample2(540, 640);
  105.  
  106. sample3(100, 540);
  107. sample3(200, 640);
  108. sample3(200, 540);
  109. sample3(100, 640);
  110.  
  111. sample4(540, 100);
  112. sample4(640, 200);
  113. sample4(640, 100);
  114. sample4(540, 200);
  115. }
  116.  
  117. void sample1(int x,int y){
  118. Graphics::setColor(255, 0, 0);
  119. Graphics::drawCircle(x, y, 30);
  120. Graphics::setColor(255, 30, 30);
  121. Graphics::drawCircle(x, y, 29);
  122. Graphics::setColor(255, 60, 60);
  123. Graphics::drawCircle(x, y, 28);
  124. Graphics::setColor(255, 90, 90);
  125. Graphics::drawCircle(x, y, 27);
  126. Graphics::setColor(255, 120, 120);
  127. Graphics::drawCircle(x, y, 26);
  128. Graphics::setColor(255, 150, 150);
  129. Graphics::drawCircle(x, y, 25);
  130. Graphics::setColor(255, 160, 160);
  131. Graphics::drawCircle(x, y, 24);
  132. Graphics::setColor(255, 170, 170);
  133. Graphics::drawCircle(x, y, 23);
  134. Graphics::setColor(255, 180, 180);
  135. Graphics::drawCircle(x, y, 22);
  136. Graphics::setColor(255, 190, 190);
  137. Graphics::drawFillCircle(x, y, 18);
  138. }
  139.  
  140. void sample2(int x, int y){
  141. Graphics::setColor(0, 255, 0);
  142. Graphics::drawCircle(x, y, 30);
  143. Graphics::setColor(30, 255, 30);
  144. Graphics::drawCircle(x, y, 29);
  145. Graphics::setColor(60, 255, 60);
  146. Graphics::drawCircle(x, y, 28);
  147. Graphics::setColor(90, 255, 90);
  148. Graphics::drawCircle(x, y, 27);
  149. Graphics::setColor(120, 255, 120);
  150. Graphics::drawCircle(x, y, 26);
  151. Graphics::setColor(150, 255, 150);
  152. Graphics::drawCircle(x, y, 25);
  153. Graphics::setColor(160, 255, 160);
  154. Graphics::drawCircle(x, y, 24);
  155. Graphics::setColor(170, 255, 170);
  156. Graphics::drawCircle(x, y, 23);
  157. Graphics::setColor(180, 255, 180);
  158. Graphics::drawCircle(x, y, 22);
  159. Graphics::setColor(190, 255, 190);
  160. Graphics::drawFillCircle(x, y, 18);
  161. }
  162.  
  163. void sample3(int x, int y){
  164. Graphics::setColor(0, 0, 255);
  165. Graphics::drawCircle(x, y, 30);
  166. Graphics::setColor(30, 30, 255);
  167. Graphics::drawCircle(x, y, 29);
  168. Graphics::setColor(60, 60, 255);
  169. Graphics::drawCircle(x, y, 28);
  170. Graphics::setColor(90, 90, 255);
  171. Graphics::drawCircle(x, y, 27);
  172. Graphics::setColor(120, 120, 255);
  173. Graphics::drawCircle(x, y, 26);
  174. Graphics::setColor(150, 150, 255);
  175. Graphics::drawCircle(x, y, 25);
  176. Graphics::setColor(160, 160, 255);
  177. Graphics::drawCircle(x, y, 24);
  178. Graphics::setColor(170, 170, 255);
  179. Graphics::drawCircle(x, y, 23);
  180. Graphics::setColor(180, 180, 255);
  181. Graphics::drawCircle(x, y, 22);
  182. Graphics::setColor(190, 190, 255);
  183. Graphics::drawFillCircle(x, y, 18);
  184. }
  185.  
  186. void sample4(int x, int y){
  187. Graphics::setColor(255, 255, 0);
  188. Graphics::drawCircle(x, y, 30);
  189. Graphics::setColor(255, 255, 30);
  190. Graphics::drawCircle(x, y, 29);
  191. Graphics::setColor(255, 255, 60);
  192. Graphics::drawCircle(x, y, 28);
  193. Graphics::setColor(255, 255, 90);
  194. Graphics::drawCircle(x, y, 27);
  195. Graphics::setColor(255, 255, 120);
  196. Graphics::drawCircle(x, y, 26);
  197. Graphics::setColor(255, 255, 150);
  198. Graphics::drawCircle(x, y, 25);
  199. Graphics::setColor(255, 255, 160);
  200. Graphics::drawCircle(x, y, 24);
  201. Graphics::setColor(255, 255, 170);
  202. Graphics::drawCircle(x, y, 23);
  203. Graphics::setColor(255, 255, 180);
  204. Graphics::drawCircle(x, y, 22);
  205. Graphics::setColor(255, 255, 190);
  206. Graphics::drawFillCircle(x, y, 18);
  207. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: illegal character: '#'
#include "Graphics.h"
^
Main.java:1: error: class, interface, or enum expected
#include "Graphics.h"
         ^
Main.java:2: error: illegal character: '#'
#include <conio.h>
^
Main.java:3: error: illegal character: '#'
#include <Windows.h>
^
Main.java:4: error: illegal character: '#'
#include <iostream>
^
Main.java:6: error: class, interface, or enum expected
void sample1(int, int);
^
Main.java:7: error: class, interface, or enum expected
void sample2(int, int);
^
Main.java:8: error: class, interface, or enum expected
void sample3(int, int);
^
Main.java:9: error: class, interface, or enum expected
void sample4(int, int);
^
Main.java:10: error: class, interface, or enum expected
void drawing();
^
Main.java:11: error: class, interface, or enum expected
void main(){
^
Main.java:14: error: class, interface, or enum expected
	_getch();
	^
Main.java:15: error: class, interface, or enum expected
}
^
Main.java:19: error: class, interface, or enum expected
	Graphics::fullscreen();
	^
Main.java:20: error: class, interface, or enum expected
	cout << "Please maximize the window and press any key to continue";
	^
Main.java:21: error: class, interface, or enum expected
	_getch();
	^
Main.java:22: error: class, interface, or enum expected
	system("cls");
	^
Main.java:23: error: class, interface, or enum expected
	Graphics::clr(15);
	^
Main.java:24: error: class, interface, or enum expected
	Graphics::square(2, 2, 89, 89);
	^
Main.java:25: error: class, interface, or enum expected
	Graphics::clr(0);
	^
Main.java:27: error: class, interface, or enum expected
	Graphics::square(2, 2, 3, 3);
	^
Main.java:28: error: class, interface, or enum expected
	Graphics::square(88, 88, 3, 3);
	^
Main.java:29: error: class, interface, or enum expected
	Graphics::square(88, 2, 3, 3);
	^
Main.java:30: error: class, interface, or enum expected
	Graphics::square(2, 88, 3, 3);
	^
Main.java:32: error: class, interface, or enum expected
	Graphics::clr(10);
	^
Main.java:34: error: class, interface, or enum expected
	Graphics::fsquare(3, 35, 87, 21);
	^
Main.java:35: error: class, interface, or enum expected
	Graphics::fsquare(35, 3, 21, 87);
	^
Main.java:37: error: class, interface, or enum expected
	Graphics::clr(0);
	^
Main.java:39: error: class, interface, or enum expected
	Graphics::square(4, 36, 85, 19);
	^
Main.java:40: error: class, interface, or enum expected
	Graphics::square(36, 4, 19, 85);
	^
Main.java:42: error: class, interface, or enum expected
	Graphics::clr(12);
	^
Main.java:44: error: class, interface, or enum expected
	for (int i = 0; i < 6; i++)
	^
Main.java:44: error: class, interface, or enum expected
	for (int i = 0; i < 6; i++)
	                ^
Main.java:44: error: class, interface, or enum expected
	for (int i = 0; i < 6; i++)
	                       ^
Main.java:46: error: class, interface, or enum expected
		for (int j = 0; j < 3; j++)
		                ^
Main.java:46: error: class, interface, or enum expected
		for (int j = 0; j < 3; j++)
		                       ^
Main.java:51: error: class, interface, or enum expected
		}
		^
Main.java:56: error: class, interface, or enum expected
	for (int i = 0; i < 3; i++)
	^
Main.java:56: error: class, interface, or enum expected
	for (int i = 0; i < 3; i++)
	                ^
Main.java:56: error: class, interface, or enum expected
	for (int i = 0; i < 3; i++)
	                       ^
Main.java:58: error: class, interface, or enum expected
		for (int j = 0; j < 6; j++)
		                ^
Main.java:58: error: class, interface, or enum expected
		for (int j = 0; j < 6; j++)
		                       ^
Main.java:63: error: class, interface, or enum expected
		}
		^
Main.java:68: error: class, interface, or enum expected
	for (int i = 0; i < 6; i++)
	^
Main.java:68: error: class, interface, or enum expected
	for (int i = 0; i < 6; i++)
	                ^
Main.java:68: error: class, interface, or enum expected
	for (int i = 0; i < 6; i++)
	                       ^
Main.java:70: error: class, interface, or enum expected
		for (int j = 0; j < 3; j++)
		                ^
Main.java:70: error: class, interface, or enum expected
		for (int j = 0; j < 3; j++)
		                       ^
Main.java:75: error: class, interface, or enum expected
		}
		^
Main.java:80: error: class, interface, or enum expected
	for (int i = 0; i < 3; i++)
	^
Main.java:80: error: class, interface, or enum expected
	for (int i = 0; i < 3; i++)
	                ^
Main.java:80: error: class, interface, or enum expected
	for (int i = 0; i < 3; i++)
	                       ^
Main.java:82: error: class, interface, or enum expected
		for (int j = 0; j < 6; j++)
		                ^
Main.java:82: error: class, interface, or enum expected
		for (int j = 0; j < 6; j++)
		                       ^
Main.java:87: error: class, interface, or enum expected
		}
		^
Main.java:91: error: class, interface, or enum expected
	Graphics::drawFillCircle(44, 44, 28);
	^
Main.java:92: error: class, interface, or enum expected
	Graphics::drawFillCircle(700, 700, 28);
	^
Main.java:93: error: class, interface, or enum expected
	Graphics::drawFillCircle(700, 45, 28);
	^
Main.java:94: error: class, interface, or enum expected
	Graphics::drawFillCircle(45, 700, 28);
	^
Main.java:96: error: class, interface, or enum expected
	sample1(100, 100);
	^
Main.java:97: error: class, interface, or enum expected
	sample1(200, 200);
	^
Main.java:98: error: class, interface, or enum expected
	sample1(200, 100);
	^
Main.java:99: error: class, interface, or enum expected
	sample1(100, 200);
	^
Main.java:101: error: class, interface, or enum expected
	sample2(540, 540);
	^
Main.java:102: error: class, interface, or enum expected
	sample2(640, 640);
	^
Main.java:103: error: class, interface, or enum expected
	sample2(640, 540);
	^
Main.java:104: error: class, interface, or enum expected
	sample2(540, 640);
	^
Main.java:106: error: class, interface, or enum expected
	sample3(100, 540);
	^
Main.java:107: error: class, interface, or enum expected
	sample3(200, 640);
	^
Main.java:108: error: class, interface, or enum expected
	sample3(200, 540);
	^
Main.java:109: error: class, interface, or enum expected
	sample3(100, 640);
	^
Main.java:111: error: class, interface, or enum expected
	sample4(540, 100);
	^
Main.java:112: error: class, interface, or enum expected
	sample4(640, 200);
	^
Main.java:113: error: class, interface, or enum expected
	sample4(640, 100);
	^
Main.java:114: error: class, interface, or enum expected
	sample4(540, 200);
	^
Main.java:115: error: class, interface, or enum expected
}
^
Main.java:119: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 30);
	^
Main.java:120: error: class, interface, or enum expected
	Graphics::setColor(255, 30, 30);
	^
Main.java:121: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 29);
	^
Main.java:122: error: class, interface, or enum expected
	Graphics::setColor(255, 60, 60);
	^
Main.java:123: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 28);
	^
Main.java:124: error: class, interface, or enum expected
	Graphics::setColor(255, 90, 90);
	^
Main.java:125: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 27);
	^
Main.java:126: error: class, interface, or enum expected
	Graphics::setColor(255, 120, 120);
	^
Main.java:127: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 26);
	^
Main.java:128: error: class, interface, or enum expected
	Graphics::setColor(255, 150, 150);
	^
Main.java:129: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 25);
	^
Main.java:130: error: class, interface, or enum expected
	Graphics::setColor(255, 160, 160);
	^
Main.java:131: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 24);
	^
Main.java:132: error: class, interface, or enum expected
	Graphics::setColor(255, 170, 170);
	^
Main.java:133: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 23);
	^
Main.java:134: error: class, interface, or enum expected
	Graphics::setColor(255, 180, 180);
	^
Main.java:135: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 22);
	^
Main.java:136: error: class, interface, or enum expected
	Graphics::setColor(255, 190, 190);
	^
Main.java:137: error: class, interface, or enum expected
	Graphics::drawFillCircle(x, y, 18);
	^
Main.java:138: error: class, interface, or enum expected
}
^
Main.java:142: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 30);
	^
Main.java:143: error: class, interface, or enum expected
	Graphics::setColor(30, 255, 30);
	^
Main.java:144: error: class, interface, or enum expected
	Graphics::drawCircle(x, y, 29);
	^
Main.java:145: error: class, interface, or enum expected
	Graphics::setColor(60, 255, 60);
	^
100 errors
stdout
Standard output is empty