Monday, August 20, 2018

MULTIPLICATION TABLE

  • Problem Description

    Veena telling tables to her friend saradha, for every no of saradha veena telling tables upto 5,
    help to her to write code to solve the task.
    Input Method

    Integer ranges from 1 to 999

    Output Method

    Multiplication table upto 5

  • CODING ARENA::
  • #include <stdio.h>
    struct table
      {
      int a; 
      }t;
    int main()
    {
      scanf("%d",&t.a); 
      printf("1*%d=%d\n",t.a,1*t.a);
      printf("2*%d=%d\n",t.a,2*t.a);
      printf("3*%d=%d\n",t.a,3*t.a);
      printf("4*%d=%d\n",t.a,4*t.a);
      printf("5*%d=%d\n",t.a,5*t.a);
    return 0;
    }
  • Test Case 1

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

    Input (stdin)
    10
    
    
    Expected Output
    1*10=10
    
    2*10=20
    
    3*10=30
    
    4*10=40
    
    5*10=50

1 comment:

  1. I am very much pleased with the contents you have mentioned. I wanted to thank you for this great article. Multiplication chart

    ReplyDelete