#include #include #include #include using namespace std; char arr[][200] = { "Write clearly - don't be too clever.", "Say what you mean, simply and directly.", "Use library functions whenever feasible.", "Avoid too many temporary variables.", "Write clearly - don't sacrifice clarity for efficiency.", "Let the machine do the dirty work.", "Replace repetitive expressions by calls to common functions.", "Parenthesize to avoid ambiguity.", "Choose variable names that won't be confused.", "Avoid unnecessary branches.", "If a logical expression is hard to understand, try transforming it.", "Choose a data representation that makes the program simple.", "Write first in easy-to-understand pseudo language; then translate into whatever language you have to use.", "Modularize. Use procedures and functions.", "Avoid gotos completely if you can keep the program readable.", "" }; int main() { //char phrase[] = "This is a phrase of information to be displayed."; //cout << phrase << endl; //get the width of text area. struct winsize w; ioctl(0, TIOCGWINSZ, &w); int ncolumns = w.ws_col; int i = 0; while (strlen(arr[i]) > 0) { //shrink_string(); //display the data cout << arr[i] << endl; ++i; } return 0; }