Create Tabular Output - C++ Language Basics

C++ examples for Language Basics:Console

Description

Create Tabular Output

Demo Code

#include <iostream>

int main(int argc, const char *argv[]) {
    int counter = 0;

    printf("N\t10*N\t100*N\t1000*N\n\n");

    while (counter < 5) {
        counter++;//from ww  w. jav  a 2s .  com

        printf("%d\t%d\t%d\t%d\n", counter, counter * 10, counter * 100,counter * 1000);
    }
    return 0;
}

Result


Related Tutorials