Thursday, 9 December 2021

MULTIPLICATION TABLE

method:_1 (less effective) 

# include <stdio.h>


int main()
{
    int num;
    printf("enter the number of which's table you want: \n");
    scanf ("%d", & num);

    printf("multiplication table of %d is as follows:\n", num);

    printf("%d * 1 =%d\n",num, num*1);
    printf("%d * 2 =%d\n",num, num*2);
    printf("%d * 3 =%d\n",num, num*3);
    printf("%d * 4 =%d\n",num, num*4);
    printf("%d * 5 =%d\n",num, num*5);
    printf("%d * 6 =%d\n",num, num*6);
    printf("%d * 7 =%d\n",num, num*7);
    printf("%d * 8 =%d\n",num, num*8);
    printf("%d * 9 =%d\n",num, num*9);
    printf("%d * 10 =%d\n",num, num*10);
   
    return 0;
}

project:_2 (worthy)

# include <stdio.h>

int main()
{
    int num;

    printf("enter the number of which's table you want: \n");
    scanf ("%d", & num);

    printf("multiplication table of %d is as follows:\n", num);

    for (int i = 1; i < 11; i++)

    printf("%d * %d= %d\n",num,i,num*i);

}



No comments:

Post a Comment

here we are to help you.you can watch videos and get information about :- (1) scientific facts (2) education (3) gaming (4) music (5) lyrics (6) cartoons and many more.So keep watching keep learning, thank you.

Recurtions

  //Why are recursions? //We can solve difficult long iteratively can be solved simply recursively. // there are some problems which suite...