Created
February 18, 2015 08:53
-
-
Save fahdi/330feef82e9206a57bf7 to your computer and use it in GitHub Desktop.
Table Printing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
using namespace std; | |
int main(void) | |
{ | |
cout << "A multiplication table:" << endl | |
<< " 1\t2\t3\t4\t5\t6\t7\t8\t9" << endl | |
<< "" << endl; | |
for(int c = 1; c < 10; c++) | |
{ | |
cout << c << "| "; | |
for(int i = 1; i < 10; i++) | |
{ | |
cout << i * c << '\t'; | |
} | |
cout << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment