fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. void Convert (int i)
  7. {
  8. int a=(i/100);
  9. int b=(i/10)%10;
  10. int c=i%10;
  11.  
  12. if(i>=100)
  13. {
  14. if(a==2)
  15. cout<<"#";
  16. else
  17. cout<<a;
  18. }
  19.  
  20. if(i>=10)
  21. {
  22. if(b==2)
  23. cout<<"#";
  24. else
  25. cout<<b;
  26. }
  27.  
  28.  
  29. if(c==2)
  30. cout<<"#";
  31. else
  32. cout<<c;
  33.  
  34.  
  35. cout<<" ";
  36.  
  37. }
  38.  
  39. int main() {
  40. // your code goes here
  41.  
  42. int digit= 2;
  43. int a,b,c;
  44. string A, B, C;
  45.  
  46. for(int i =0; i<200; i++)
  47. {
  48. Convert(i);
  49. }
  50.  
  51. return 0;
  52. }
  53.  
  54.  
  55.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
0 1 # 3 4 5 6 7 8 9 10 11 1# 13 14 15 16 17 18 19 #0 #1 ## #3 #4 #5 #6 #7 #8 #9 30 31 3# 33 34 35 36 37 38 39 40 41 4# 43 44 45 46 47 48 49 50 51 5# 53 54 55 56 57 58 59 60 61 6# 63 64 65 66 67 68 69 70 71 7# 73 74 75 76 77 78 79 80 81 8# 83 84 85 86 87 88 89 90 91 9# 93 94 95 96 97 98 99 100 101 10# 103 104 105 106 107 108 109 110 111 11# 113 114 115 116 117 118 119 1#0 1#1 1## 1#3 1#4 1#5 1#6 1#7 1#8 1#9 130 131 13# 133 134 135 136 137 138 139 140 141 14# 143 144 145 146 147 148 149 150 151 15# 153 154 155 156 157 158 159 160 161 16# 163 164 165 166 167 168 169 170 171 17# 173 174 175 176 177 178 179 180 181 18# 183 184 185 186 187 188 189 190 191 19# 193 194 195 196 197 198 199