Thursday, September 13, 2018

MULTIPLICATION TABLE

  • Problem Description

    Write a C program to print the multiplication table of an integer n upto m rows using a while loop

    Input Format:

    Input consists of 2 integers .The first integer corresponds to n . The second integer corresponds to M
  • CODING ARENA::
  • #include <stdio.h>
    int main()
    {
      int i,a,b;
      scanf("%d\n%d",&a,&b);
      for(i=1;i<=b;i++)
      {
        printf("\n%d*%d=%d",i,a,i*a);
      }

    return 0;
    }
  • Test Case 1

    Input (stdin)
    5
    
    4
    
    
    Expected Output
    1*5=5
    
    2*5=10
    
    3*5=15
    
    4*5=20
  • Test Case 2

    Input (stdin)
    3
    
    3
    
    
    Expected Output
    1*3=3
    
    2*3=6
    
    3*3=9

1 comment:

  1. it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity.. Multiplication table

    ReplyDelete