Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <inttypes.h>
- int main()
- {
- int32_t a, b, n;
- if(scanf("%d%d%d", &a, &b, &n) != 3)
- {
- fprintf(stderr, "Sorry, can't read");
- return 1;
- }
- for (int32_t i = a - 1; i < b; ++i)
- {
- if (i == a - 1)
- {
- for (int32_t j = 0; j < n; ++j)
- {
- printf("%c", ' ');
- }
- }
- else
- {
- printf(" %*d", n, i);
- }
- }
- printf("\n");
- for (int32_t i = a; i < b; ++i)
- {
- printf("%*d", n, i);
- for (int32_t j = a; j < b; ++j)
- {
- int64_t ans = i * j;
- printf(" %*ld", n, ans);
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement