03_FLOW_Testat bestanden

This commit is contained in:
Johannes Theiner 2018-10-23 11:17:40 +02:00
parent 93991e767b
commit 6ff4a41273
1 changed files with 53 additions and 2 deletions

View File

@ -5,9 +5,56 @@ AnsiConsole console;
int firstLine; int firstLine;
int currentTick; int currentTick;
Colors currentColor; Colors currentColor;
#define INITPRINT(label) {firstLine=__LINE__;console.printText(2*currentTick,0,label,Colors::BLACK);} #define INITPRINT(label) {firstLine=__LINE__;console.printText(2*currentTick,0,label,Colors::WHITE);}
#define PRINT printLineNumber(__LINE__) #define PRINT printLineNumber(__LINE__)
void printLineNumber(int lineNumber); void printLineNumber(int lineNumber);
void b();void asub();void csub();void c();
void d() {
INITPRINT("c");
c();
}
void csub() {
for(int i = 0; i <= 2; i++) {
PRINT;
}
}
void a() {
INITPRINT("a");
asub();PRINT;asub();PRINT;asub();PRINT;
}
void b() {
INITPRINT("b");
for(int i = 0; i <= 4; i++) {
if(i % 2) {
asub();PRINT;}
else {
asub();PRINT;
}
}
}
void c() {
for(int i = 0; i <= 4; i++) {
if(i % 2) {
csub();PRINT;}
else {
csub();PRINT;
}
}
}
void asub() {
for(int i = 0; i <= 2; i++) {
PRINT;
}
}
int main(int argc, const char *argv[]) { int main(int argc, const char *argv[]) {
@ -16,6 +63,10 @@ int main(int argc, const char *argv[]) {
currentColor = Colors::GREEN; currentColor = Colors::GREEN;
//a();
//b();
d();
std::string s; std::string s;
std::cin >> s; std::cin >> s;