|
|
Study of console i/o - 4
|
|
#include <stdio.h> int main(void) { int num, x; printf("\nEnter a number : "); scanf("%d", &num); for(x = 1 ; x <= 10 ; x++) { //printf("\n%d X %d = %d", num, x, num * x); //printf("\n%5d X %5d = %5d", num, x, num * x); // default: right justify printf("\n%-5d X %-5d = %-5d", num, x, num * x); // left justify } return 0; } |
|
|
|
|
|
|
|