add textdemo
This commit is contained in:
@ -25,7 +25,7 @@ int main() {
|
|||||||
|
|
||||||
|
|
||||||
text_demo();
|
text_demo();
|
||||||
sound_demo();
|
// sound_demo();
|
||||||
|
|
||||||
while (1);
|
while (1);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -14,15 +14,15 @@
|
|||||||
void text_demo() {
|
void text_demo() {
|
||||||
|
|
||||||
/* Hier muess Code eingefuegt werden */
|
/* Hier muess Code eingefuegt werden */
|
||||||
|
|
||||||
// TODO:
|
|
||||||
// kout << fixedwidth(5) << "Test" << endl;
|
|
||||||
|
|
||||||
kout << "Test der Zahlenausgabefunktion:" << endl << endl;
|
kout << "Test der Zahlenausgabefunktion:" << endl << endl;
|
||||||
kout << "| dec | hex | bin |" << endl;
|
kout << "| dec | hex | bin |" << endl;
|
||||||
kout << "+-----+------+-------+" << endl;
|
kout << "+-------+-------+-------+" << endl;
|
||||||
|
|
||||||
for (unsigned char num = 0; num < 17; ++num) {
|
// TODO: should fillw just work for the next << ?
|
||||||
kout << "| | | |" << endl;
|
for (unsigned short num = 0; num < 17; ++num) {
|
||||||
|
kout << fillw(0) << "| " << fillw(6) << dec << num;
|
||||||
|
kout << fillw(0) << "| " << fillw(6) << hex << num;
|
||||||
|
kout << fillw(0) << "| " << fillw(6) << bin << num;
|
||||||
|
kout << fillw(0) << "|" << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user