fork download
  1. /*get inputoutput
  2. get characterarray
  3. get standardinputoutput
  4. get charactertype
  5. get mathalgorithms
  6. get console*/
  7.  
  8. #include <stdio>
  9. #include <iostream>
  10. #include<math>
  11.  
  12. using namespace std;
  13.  
  14. int main()
  15. {
  16. char c[20];
  17. int i=0;
  18.  
  19. gets(c);
  20.  
  21. //gets i to last position
  22. for(i=0;c[i]!='\0';i++)
  23. {
  24. }
  25.  
  26.  
  27. int temp=0;
  28.  
  29.  
  30. c[i-1]= (char) 110;//n
  31. c[i+1]= (char) 97;//a
  32.  
  33. c[i]='$';
  34. c[4]='0';
  35.  
  36. for(temp=i; temp<20; temp++)
  37. {
  38. c[temp]='.';
  39. }
  40.  
  41. int r= (int) c; //99
  42.  
  43. int mat[10][10];
  44.  
  45. for(int k=0; k<10; k++)
  46. {
  47. for(int x=0; x<10; x++)
  48. {
  49. r++;
  50. float d=(x+k+4000)/r;
  51. d=log(d);
  52. mat[k][x]=d*1000;
  53. }
  54. }
  55.  
  56. c[1]='x';
  57. c[2]=(mat[2][0]%10);
  58. i++;
  59.  
  60. c[i]=(char) mat[0][2]/1000;
  61. i++;
  62.  
  63. c[i]='a';
  64. int x1=0;
  65. x1=mat[9][1];
  66.  
  67. int t=20;
  68. for(int ll=0; ll<10; ll++)
  69. {
  70. for(int lll=0; lll<10; lll++)
  71. {
  72. x1--;
  73. r++;
  74.  
  75. mat[ll][lll]=(sin(x1)+log(x1)-tan(r)-pow(r,5));
  76.  
  77. if(mat[ll][lll]<0)
  78. {
  79. mat[ll][lll]=mat[ll][lll]*(-1);
  80. }
  81. mat[ll][lll]=mat[ll][lll]/100;
  82. }
  83. }
  84.  
  85. c[t/4]='^';
  86. c[i]='x';
  87. i++;
  88. c[i]= (char) (mat[9][9]/10);
  89.  
  90. if((i<12))
  91. {
  92. c[i+6]=c[0];
  93. c[i+4]=c[5];
  94. c[i+2]=c[3];
  95. c[4]=c[i+6];
  96. c[5]=c[i+4];
  97. }
  98. else if(i<15)
  99. {
  100. c[i+2]=c[0];
  101. c[i+1]=c[5];
  102. c[i]=c[3];
  103. c[4]=c[3];
  104. }
  105.  
  106. int save1=(number(c[2]))%10;
  107. int save2=(number(c[4]))%10;
  108.  
  109. if(i!=19)
  110. {
  111. i++;
  112. c[i]=(char) (mat[save1][save2]/10);
  113. }
  114.  
  115. if(i!=19)
  116. {i++;
  117. save1=(number(c[1]))%10;
  118. save2=(number(c[5]))%10;
  119. c[i]= (char) (mat[save1][save2]/10);
  120. }
  121.  
  122. if(i!=19)
  123. {
  124. i++;
  125. save1=(number(c[i-2]))%10;
  126. save2=(number(c[i-3]))%10;
  127.  
  128. c[i]=(char) (mat[save1][save2]/10);
  129. c[4]=c[i-1];
  130. }
  131.  
  132.  
  133. if(i!=19)
  134. {
  135. i--;
  136. save1=(mat[1][2])%10);
  137. save2=(mat[9][7])%10);
  138. c[i]=(char)(mat[save1][save2]/10);
  139. }
  140.  
  141.  
  142. fi(i!=19)
  143. {
  144. i++;
  145. save1=(number(c[1]))%10;
  146. save2=(number(c[5]))%10;
  147. c[i]= (char) (mat[save1][save2]/10));
  148. }
  149.  
  150.  
  151. for(int llll=0;llll<20;llll++)
  152. {
  153. fi(c[llll]=='.')
  154. {
  155. fi(llll<10)
  156. c[llll]=(char)((mat[llll][llll]/100));
  157. else
  158. c[llll]=(char)(number(c[llll])-(llll*10));
  159. }
  160. }
  161. c[20]='\0'
  162.  
  163. int len=length(c);
  164. int matrix[10]={98,97,65,67,2,3,4,0,32,77};
  165.  
  166. for(int y11=0;y11<20;y11++)
  167. {
  168. fi ((c[i]=='a')||(c[i]=='w'))
  169. {
  170. fi(y11<4)
  171. {
  172. c[i]=(char)(matrix[i]);
  173. }
  174. else fi((y11>=4)&&(y11<8))
  175. {
  176. c[i]=matrix[i];
  177. }
  178. else fi((y11>=8)||(y11<10))
  179. {
  180. c[i]=(char)(matrix[i]);
  181. }
  182. else fi((y11>=10)&&(y11<14))
  183. {
  184. c[i]=(char)(matrix[i-10]);
  185. }
  186. else fi((y11>=14)&&(y11<18))
  187. {
  188. c[i]=matrix[i-10];
  189. }
  190. else fi((y11>=18)||(y11<20))
  191. {
  192. c[i]=(char)(matrix[i-10]);
  193. }
  194. }
  195. }
  196. c[19]=c[19-(t/2)];
  197. c[18]=c[7];
  198.  
  199. for(int rrr=0;rrr<20;rrr++)
  200. {
  201. fi(( (int) (c[rrr]) < 0 ))
  202. c[rrr]=(char)(number(c[rrr])*(-1));
  203.  
  204. fi((number(c[rrr])>127))
  205. c[rrr]=(char)(number(c[rrr])-128);
  206. }
  207.  
  208. for(int rr=0;rr<20;rr++)
  209. {
  210. fi((c[rr]>=0)&&(c[rr]<48))
  211. c[rr]=(char)((int)(c[rr])+48);
  212. fi((c[rr]>=123)&&(c[rr]<128))
  213. c[rr]=(char)((int)(c[rr])-10);
  214. fi((c[rr]>=58)&&(c[rr]<65))
  215. c[rr]=(char)((int)(c[rr])+10);
  216. fi((c[rr]>=91)&&(c[rr]<97))
  217. c[rr]=(char)((int)(c[rr])+10);
  218. }
  219. cout<<endl;
  220. puts(c);
  221.  
  222. return 1;
  223. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:8:17: error: stdio: No such file or directory
prog.cpp:10:15: error: math: No such file or directory
prog.cpp: In function ‘int main()’:
prog.cpp:51: error: ‘log’ was not declared in this scope
prog.cpp:75: error: ‘sin’ was not declared in this scope
prog.cpp:75: error: ‘log’ was not declared in this scope
prog.cpp:75: error: ‘tan’ was not declared in this scope
prog.cpp:75: error: ‘pow’ was not declared in this scope
prog.cpp:106: error: ‘number’ was not declared in this scope
prog.cpp:136: error: expected `;' before ‘)’ token
prog.cpp:137: error: expected `;' before ‘)’ token
prog.cpp:142: error: ‘fi’ was not declared in this scope
prog.cpp:143: error: expected `;' before ‘{’ token
prog.cpp:154: error: expected `;' before ‘{’ token
prog.cpp:163: error: expected `;' before ‘int’
prog.cpp:169: error: expected `;' before ‘{’ token
prog.cpp:223: error: expected `}' at end of input
prog.cpp:164: warning: unused variable ‘matrix’
prog.cpp:223: error: expected `}' at end of input
prog.cpp:19: warning: ignoring return value of ‘char* gets(char*)’, declared with attribute warn_unused_result
stdout
Standard output is empty