Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- It prints the multiplication tables for integers between a and b.
- */
- #include <stdio.h>
- int main(){
- int a, b, t;
- printf("Enter a, b: ");
- scanf("%d %d", &a, &b);
- printf("Multiplication table %d:\n", a);
- for(t = 1; a <= b; t++){
- printf("%d x %d = %d\n", a, t, a*t);
- if(t == 10){
- t = 0;
- a++;
- if(a <= b)
- printf("\nMultiplication table %d:\n", a);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement