-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbase91_test.cpp
More file actions
42 lines (38 loc) · 772 Bytes
/
base91_test.cpp
File metadata and controls
42 lines (38 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <cstdio>
#include <random>
#include <cmath>
#include <string>
#include <cstring>
#include <stdexcept>
#include <cassert>
#include <iostream>
#define TRACE(a) std::cout<<__LINE__<<"# "<<a<<std::endl;
//------------------------------------------------------------------------------
inline char getDigit(const unsigned n)
{
switch(n)
{
case 0:
return '!';
break;
case 35:
return '#';
break;
case 80:
return '$';
break;
default:
return 0x7F^n;
break;
}
}
//------------------------------------------------------------------------------
int main()
{
for(unsigned n=0;n<91;++n)
{
std::cout<<",DUP91('"<<getDigit(n)<<"')";
}
return EXIT_SUCCESS;
}
//------------------------------------------------------------------------------