0

Print ASCII table by using while loop?

Please help me :)

13th Jul 2016, 11:33 AM
dongocanh96
dongocanh96 - avatar
1 Respuesta
+ 2
#include <iostream> using namespace std; int main() { int c(0); while (c < 256) { cout << c << " = "<< static_cast<char>(c) << "\t\t"; if (c % 4 == 0) cout << '\n'; ++c; } cout << '\n'; return 0; }
13th Jul 2016, 12:00 PM
Firdaus Al-Ghifari
Firdaus Al-Ghifari - avatar