Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cstdlib>
- #define multiplication(x,y) (x*y)
- int main() {
- int n, m;
- FILE *f;
- f = fopen("data.txt", "rt");
- fscanf(f, "%d%d", &n, &m);
- fclose(f);
- printf(" 1 2 3 4 5 6 7 8 9 10\n");
- printf("***********************************\n");
- for (int i = 1; i <= n; i++) {
- printf("%2d * ", i);
- for (int j = 1; j <= m; j++) {
- int multiplic = multiplication(i, j);
- printf("%2d ", multiplic);
- }
- printf("\n");
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement