PGhosh

Table Problem 2

Mar 21st, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int i,j,n=1,value;
  6.     int infinity = 0;
  7.     while(infinity == 0){
  8.     printf("\nEnter the number which you want to tablize: ");
  9.     scanf("%d", &i);
  10.     printf("Enter the digit where you want end your table: ");
  11.     scanf("%d", &j);
  12.     while(n<=j){
  13.         value=i*n;
  14.         printf("%d x %d=%d\n", i,n,value);
  15.         n++;
  16.     }
  17.     }
  18.     return 0;
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment