|
|
Строка 25 529: |
Строка 25 529: |
| </center> | | </center> |
| | | |
− |
| |
− | == Плоскость чисел разрядности 4 ==
| |
− | <center>
| |
− | {|class="wikitable"
| |
− | |N
| |
− | {|class="wikitable"
| |
− | |NN
| |
− | {|class="wikitable"
| |
− | |NNN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>0
| |
− | |T<br>1
| |
− | |-
| |
− | |U<br>3
| |
− | |F<br>2
| |
− | |}
| |
− | |NNT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>4
| |
− | |T<br>5
| |
− | |-
| |
− | |U<br>7
| |
− | |F<br>6
| |
− | |}
| |
− | |-
| |
− | |NNU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>12
| |
− | |T<br>13
| |
− | |-
| |
− | |U<br>15
| |
− | |F<br>14
| |
− | |}
| |
− | |NNF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>8
| |
− | |T<br>9
| |
− | |-
| |
− | |U<br>11
| |
− | |F<br>10
| |
− | |}
| |
− | |}
| |
− | |NT
| |
− | {|class="wikitable"
| |
− | |NTN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>16
| |
− | |T<br>17
| |
− | |-
| |
− | |U<br>19
| |
− | |F<br>18
| |
− | |}
| |
− | |NTT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>20
| |
− | |T<br>21
| |
− | |-
| |
− | |U<br>23
| |
− | |F<br>22
| |
− | |}
| |
− | |-
| |
− | |NTU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>28
| |
− | |T<br>29
| |
− | |-
| |
− | |U<br>31
| |
− | |F<br>30
| |
− | |}
| |
− | |NTF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>24
| |
− | |T<br>25
| |
− | |-
| |
− | |U<br>27
| |
− | |F<br>26
| |
− | |}
| |
− | |}
| |
− | |-
| |
− | |NU
| |
− | {|class="wikitable"
| |
− | |NUN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>48
| |
− | |T<br>49
| |
− | |-
| |
− | |U<br>51
| |
− | |F<br>50
| |
− | |}
| |
− | |NUT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>52
| |
− | |T<br>53
| |
− | |-
| |
− | |U<br>55
| |
− | |F<br>54
| |
− | |}
| |
− | |-
| |
− | |NUU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>60
| |
− | |T<br>61
| |
− | |-
| |
− | |U<br>63
| |
− | |F<br>62
| |
− | |}
| |
− | |NUF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>56
| |
− | |T<br>57
| |
− | |-
| |
− | |U<br>59
| |
− | |F<br>58
| |
− | |}
| |
− | |}
| |
− | |NF
| |
− | {|class="wikitable"
| |
− | |NFN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>32
| |
− | |T<br>33
| |
− | |-
| |
− | |U<br>35
| |
− | |F<br>34
| |
− | |}
| |
− | |NFT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>36
| |
− | |T<br>37
| |
− | |-
| |
− | |U<br>39
| |
− | |F<br>38
| |
− | |}
| |
− | |-
| |
− | |NFU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>44
| |
− | |T<br>45
| |
− | |-
| |
− | |U<br>47
| |
− | |F<br>46
| |
− | |}
| |
− | |NFF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>40
| |
− | |T<br>41
| |
− | |-
| |
− | |U<br>43
| |
− | |F<br>42
| |
− | |}
| |
− | |}
| |
− | |}
| |
− | |T
| |
− | {|class="wikitable"
| |
− | |TN
| |
− | {|class="wikitable"
| |
− | |TNN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>64
| |
− | |T<br>65
| |
− | |-
| |
− | |U<br>67
| |
− | |F<br>66
| |
− | |}
| |
− | |TNT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>68
| |
− | |T<br>69
| |
− | |-
| |
− | |U<br>71
| |
− | |F<br>70
| |
− | |}
| |
− | |-
| |
− | |TNU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>76
| |
− | |T<br>77
| |
− | |-
| |
− | |U<br>79
| |
− | |F<br>78
| |
− | |}
| |
− | |TNF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>72
| |
− | |T<br>73
| |
− | |-
| |
− | |U<br>75
| |
− | |F<br>74
| |
− | |}
| |
− | |}
| |
− | |TT
| |
− | {|class="wikitable"
| |
− | |TTN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>80
| |
− | |T<br>81
| |
− | |-
| |
− | |U<br>83
| |
− | |F<br>82
| |
− | |}
| |
− | |TTT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>84
| |
− | |T<br>85
| |
− | |-
| |
− | |U<br>87
| |
− | |F<br>86
| |
− | |}
| |
− | |-
| |
− | |TTU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>92
| |
− | |T<br>93
| |
− | |-
| |
− | |U<br>95
| |
− | |F<br>94
| |
− | |}
| |
− | |TTF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>88
| |
− | |T<br>89
| |
− | |-
| |
− | |U<br>91
| |
− | |F<br>90
| |
− | |}
| |
− | |}
| |
− | |-
| |
− | |TU
| |
− | {|class="wikitable"
| |
− | |TUN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>112
| |
− | |T<br>113
| |
− | |-
| |
− | |U<br>115
| |
− | |F<br>114
| |
− | |}
| |
− | |TUT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>116
| |
− | |T<br>117
| |
− | |-
| |
− | |U<br>119
| |
− | |F<br>118
| |
− | |}
| |
− | |-
| |
− | |TUU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>124
| |
− | |T<br>125
| |
− | |-
| |
− | |U<br>127
| |
− | |F<br>126
| |
− | |}
| |
− | |TUF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>120
| |
− | |T<br>121
| |
− | |-
| |
− | |U<br>123
| |
− | |F<br>122
| |
− | |}
| |
− | |}
| |
− | |TF
| |
− | {|class="wikitable"
| |
− | |TFN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>96
| |
− | |T<br>97
| |
− | |-
| |
− | |U<br>99
| |
− | |F<br>98
| |
− | |}
| |
− | |TFT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>100
| |
− | |T<br>101
| |
− | |-
| |
− | |U<br>103
| |
− | |F<br>102
| |
− | |}
| |
− | |-
| |
− | |TFU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>108
| |
− | |T<br>109
| |
− | |-
| |
− | |U<br>111
| |
− | |F<br>110
| |
− | |}
| |
− | |TFF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>104
| |
− | |T<br>105
| |
− | |-
| |
− | |U<br>107
| |
− | |F<br>106
| |
− | |}
| |
− | |}
| |
− | |}
| |
− | |-
| |
− | |U
| |
− | {|class="wikitable"
| |
− | |UN
| |
− | {|class="wikitable"
| |
− | |UNN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>192
| |
− | |T<br>193
| |
− | |-
| |
− | |U<br>195
| |
− | |F<br>194
| |
− | |}
| |
− | |UNT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>196
| |
− | |T<br>197
| |
− | |-
| |
− | |U<br>199
| |
− | |F<br>198
| |
− | |}
| |
− | |-
| |
− | |UNU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>204
| |
− | |T<br>205
| |
− | |-
| |
− | |U<br>207
| |
− | |F<br>206
| |
− | |}
| |
− | |UNF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>200
| |
− | |T<br>201
| |
− | |-
| |
− | |U<br>203
| |
− | |F<br>202
| |
− | |}
| |
− | |}
| |
− | |UT
| |
− | {|class="wikitable"
| |
− | |UTN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>208
| |
− | |T<br>209
| |
− | |-
| |
− | |U<br>211
| |
− | |F<br>210
| |
− | |}
| |
− | |UTT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>212
| |
− | |T<br>213
| |
− | |-
| |
− | |U<br>215
| |
− | |F<br>214
| |
− | |}
| |
− | |-
| |
− | |UTU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>220
| |
− | |T<br>221
| |
− | |-
| |
− | |U<br>223
| |
− | |F<br>222
| |
− | |}
| |
− | |UTF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>216
| |
− | |T<br>217
| |
− | |-
| |
− | |U<br>219
| |
− | |F<br>218
| |
− | |}
| |
− | |}
| |
− | |-
| |
− | |UU
| |
− | {|class="wikitable"
| |
− | |UUN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>240
| |
− | |T<br>241
| |
− | |-
| |
− | |U<br>243
| |
− | |F<br>242
| |
− | |}
| |
− | |UUT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>244
| |
− | |T<br>245
| |
− | |-
| |
− | |U<br>247
| |
− | |F<br>246
| |
− | |}
| |
− | |-
| |
− | |UUU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>252
| |
− | |T<br>253
| |
− | |-
| |
− | |U<br>255
| |
− | |F<br>254
| |
− | |}
| |
− | |UUF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>248
| |
− | |T<br>249
| |
− | |-
| |
− | |U<br>251
| |
− | |F<br>250
| |
− | |}
| |
− | |}
| |
− | |UF
| |
− | {|class="wikitable"
| |
− | |UFN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>224
| |
− | |T<br>225
| |
− | |-
| |
− | |U<br>227
| |
− | |F<br>226
| |
− | |}
| |
− | |UFT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>228
| |
− | |T<br>229
| |
− | |-
| |
− | |U<br>231
| |
− | |F<br>230
| |
− | |}
| |
− | |-
| |
− | |UFU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>236
| |
− | |T<br>237
| |
− | |-
| |
− | |U<br>239
| |
− | |F<br>238
| |
− | |}
| |
− | |UFF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>232
| |
− | |T<br>233
| |
− | |-
| |
− | |U<br>235
| |
− | |F<br>234
| |
− | |}
| |
− | |}
| |
− | |}
| |
− | |F
| |
− | {|class="wikitable"
| |
− | |FN
| |
− | {|class="wikitable"
| |
− | |FNN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>128
| |
− | |T<br>129
| |
− | |-
| |
− | |U<br>131
| |
− | |F<br>130
| |
− | |}
| |
− | |FNT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>132
| |
− | |T<br>133
| |
− | |-
| |
− | |U<br>135
| |
− | |F<br>134
| |
− | |}
| |
− | |-
| |
− | |FNU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>140
| |
− | |T<br>141
| |
− | |-
| |
− | |U<br>143
| |
− | |F<br>142
| |
− | |}
| |
− | |FNF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>136
| |
− | |T<br>137
| |
− | |-
| |
− | |U<br>139
| |
− | |F<br>138
| |
− | |}
| |
− | |}
| |
− | |FT
| |
− | {|class="wikitable"
| |
− | |FTN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>144
| |
− | |T<br>145
| |
− | |-
| |
− | |U<br>147
| |
− | |F<br>146
| |
− | |}
| |
− | |FTT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>148
| |
− | |T<br>149
| |
− | |-
| |
− | |U<br>151
| |
− | |F<br>150
| |
− | |}
| |
− | |-
| |
− | |FTU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>156
| |
− | |T<br>157
| |
− | |-
| |
− | |U<br>159
| |
− | |F<br>158
| |
− | |}
| |
− | |FTF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>152
| |
− | |T<br>153
| |
− | |-
| |
− | |U<br>155
| |
− | |F<br>154
| |
− | |}
| |
− | |}
| |
− | |-
| |
− | |FU
| |
− | {|class="wikitable"
| |
− | |FUN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>176
| |
− | |T<br>177
| |
− | |-
| |
− | |U<br>179
| |
− | |F<br>178
| |
− | |}
| |
− | |FUT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>180
| |
− | |T<br>181
| |
− | |-
| |
− | |U<br>183
| |
− | |F<br>182
| |
− | |}
| |
− | |-
| |
− | |FUU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>188
| |
− | |T<br>189
| |
− | |-
| |
− | |U<br>191
| |
− | |F<br>190
| |
− | |}
| |
− | |FUF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>184
| |
− | |T<br>185
| |
− | |-
| |
− | |U<br>187
| |
− | |F<br>186
| |
− | |}
| |
− | |}
| |
− | |FF
| |
− | {|class="wikitable"
| |
− | |FFN
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>160
| |
− | |T<br>161
| |
− | |-
| |
− | |U<br>163
| |
− | |F<br>162
| |
− | |}
| |
− | |FFT
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>164
| |
− | |T<br>165
| |
− | |-
| |
− | |U<br>167
| |
− | |F<br>166
| |
− | |}
| |
− | |-
| |
− | |FFU
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>172
| |
− | |T<br>173
| |
− | |-
| |
− | |U<br>175
| |
− | |F<br>174
| |
− | |}
| |
− | |FFF
| |
− | {|class="wikitable" align="center"
| |
− | |N<br>168
| |
− | |T<br>169
| |
− | |-
| |
− | |U<br>171
| |
− | |F<br>170
| |
− | |}
| |
− | |}
| |
− | |}
| |
− | |}
| |
− | </center>
| |
| | | |
| = Плоскость чисел разрядности 10 = | | = Плоскость чисел разрядности 10 = |
// main.cpp
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
enum flggs {lineval,colval};
int currer(string sm, flggs opt, ofstream& mfout, int rdctr, int basevalue=0)
{
if (rdctr<=0) {
if (opt==lineval)
mfout <<
" {|class=\"wikitable\" align=\"center\"" << endl <<
" |N [" << basevalue+0 << "]" << endl <<
" |T [" << basevalue+1 << "]" << endl <<
" |-" << endl <<
" |U [" << basevalue+3 << "]" << endl <<
" |F [" << basevalue+2 << "]" << endl <<
" |}" << endl;
else if (opt==colval)
mfout <<
" {|class=\"wikitable\" align=\"center\"" << endl <<
" |N<br>" << basevalue+0 << endl <<
" |T<br>" << basevalue+1 << endl <<
" |-" << endl <<
" |U<br>" << basevalue+3 << endl <<
" |F<br>" << basevalue+2 << endl <<
" |}" << endl;
} else {
mfout << "{|class=\"wikitable\"" << endl;
mfout << " |" << sm << "N" << endl;///////////
currer(sm+"N",opt, mfout, rdctr-1, 4*basevalue+0);
mfout << " |" << sm << "T" << endl;///////////
currer(sm+"T",opt, mfout, rdctr-1, 4*(basevalue+1));
mfout << " |-" << endl;
mfout << " |" << sm << "U" << endl;///////////
currer(sm+"U",opt, mfout, rdctr-1, 4*(basevalue+3));
mfout << " |" << sm << "F" << endl;///////////
currer(sm+"F",opt, mfout, rdctr-1, 4*(basevalue+2));
mfout << " |}" << endl;
}
}
int main(int argc, char* argv[])
{
int r;
ofstream fout("cppstudio.txt"); // создаём объект класса ofstream для записи и связываем его с файлом cppstudio.txt
// cout << "введите разрядность: ";
// cin >> r;
for (r=1; r<7; r++) {
fout << "== Плоскость чисел разрядности " << r <<" ==" << endl; // запись строки в файл
fout << "<center>" << endl; // запись строки в файл
string sm = "";
currer(sm, colval, fout,r-1);
fout << endl << "</center>" << endl; // запись строки в файл
}
fout.close(); // закрываем файл
//system("pause");
return 0;
}
#include <iostream>
#include <fstream>
using namespace std;
enum flggs {lineval,colval};
int currer(flggs opt, ofstream& mfout, int rdctr, int basevalue=0)
{
if (rdctr<=0) {
if (opt==lineval)
mfout <<
" {|class=\"wikitable\" align=\"center\"" << endl <<
" | [" << basevalue+0 <<
"] N" << endl <<
" | [" << basevalue+1 <<
"] T" << endl <<
" |-" << endl <<
" | [" << basevalue+3 <<
"] U" << endl <<
" | [" << basevalue+2 <<
"] F" << endl <<
" |}";
else if (opt==colval)
mfout <<
" {|class=\"wikitable\" align=\"center\"" << endl <<
" | " << basevalue+0 <<
" <br>N" << endl <<
" | " << basevalue+1 <<
" <br>T" << endl <<
" |-" << endl <<
" | " << basevalue+3 <<
" <br>U" << endl <<
" | " << basevalue+2 <<
" <br>F" << endl <<
" |}";
} else {
mfout << "{|class=\"wikitable\"" << endl;
mfout << " |" << endl;///////////
currer(opt, mfout, rdctr-1, 4*basevalue+0);
mfout << "N" << endl;
mfout << " |" << endl;///////////
currer(opt, mfout, rdctr-1, 4*(basevalue+1));
mfout << "T" << endl;
mfout << " |-" << endl;
mfout << " |" << endl;///////////
currer(opt, mfout, rdctr-1, 4*(basevalue+3));
mfout << "U" << endl;
mfout << " |" << endl;///////////
currer(opt, mfout, rdctr-1, 4*(basevalue+2));
mfout << "F" << endl;
mfout << " |}" << endl;
}
}
int upcurrer(flggs opt, ofstream& mfout, int rdctr, int basevalue=0)
{
if (rdctr<=0) {
if (opt==lineval)
mfout <<
" {|class=\"wikitable\" align=\"center\"" << endl <<
" |N [" << basevalue+0 << "]" << endl <<
" |T [" << basevalue+1 << "]" << endl <<
" |-" << endl <<
" |U [" << basevalue+3 << "]" << endl <<
" |F [" << basevalue+2 << "]" << endl <<
" |}" << endl;
else if (opt==colval)
mfout <<
" {|class=\"wikitable\" align=\"center\"" << endl <<
" |N<br>" << basevalue+0 << endl <<
" |T<br>" << basevalue+1 << endl <<
" |-" << endl <<
" |U<br>" << basevalue+3 << endl <<
" |F<br>" << basevalue+2 << endl <<
" |}" << endl;
} else {
mfout << "{|class=\"wikitable\"" << endl;
mfout << " |N" << endl;///////////
upcurrer(opt, mfout, rdctr-1, 4*basevalue+0);
mfout << " |T" << endl;///////////
upcurrer(opt, mfout, rdctr-1, 4*(basevalue+1));
mfout << " |-" << endl;
mfout << " |U" << endl;///////////
upcurrer(opt, mfout, rdctr-1, 4*(basevalue+3));
mfout << " |F" << endl;///////////
upcurrer(opt, mfout, rdctr-1, 4*(basevalue+2));
mfout << " |}" << endl;
}
}
int main(int argc, char* argv[])
{
int r;
ofstream fout("cppstudio.txt"); // создаём объект класса ofstream для записи и связываем его с файлом cppstudio.txt
cout << "введите разрядность: ";
cin >> r;
fout << "Карта чисел разрядности " << r << endl; // запись строки в файл
upcurrer(lineval, fout,r-1);
fout.close(); // закрываем файл
//system("pause");
return 0;
}