Search
 
SCRIPT & CODE EXAMPLE
 

C

multiplication table using c

#include <stdio.h>

int main(){
	//declaring variables
    int n,i,a,start,end;
    //taking and printing the instructions
    printf("Enter first number from where you want to start multiplication : 
");
    scanf("%d",&start);
     printf("Enter Last number from where you want to end multiplication : 
");
    scanf("%d",&end);
  	//using loops

    for(n=start;n<=end;n++){
        a=0;
        for(i=1;i<=10;i++){
            a+=n; //setting the value of a. i used addition instead of multiplication
          //because computer takes too much time for multiplating numbers than doing addition
          
            printf("%d x %d = %d
",n,i,a);

        }
        printf("Multiplication has ended of %d

",n);
    }


    return 0;


}
Comment

multiplication in c

//use the "*"

/*var*/ * /*var*/;
Comment

multiplication table in c using array

#include <stdio.h>

int main()
{
    int namta[11][10]; //programme will run upto 11 multiplication tables, each table has 10 columns
    int i,j;
    for(i = 1; i <= 11; i++)
    {
        for(j = 1; j <= 10; j++)
        {
            namta[i][j] = i * j;  //getting the multiplating value into the array
        }
    }

    for(i = 1; i <= 10; i++){
        for(j = 1; j <= 10; j++){
            printf("%d x %d = %d
",i,j,namta[i][j]);  //printing the array of results calculated in the previous loops
        }
        printf("
");
    }


    return 0;
}
Comment

c program to print the multiplication table

#include <stdio.h>
int main(){
    int a, b, c, e;
    printf("Enter table format: 
");
    scanf("%d", &a);
    printf("Enter end of table: 
");
    scanf("%d", &e);
    for(b = 0; b <= e; b++){
        printf("%d * % d = %d
", b, a, a*b);
    }
}
Comment

multiplication table in c

#include <stdio.h>
int main()
{
    // declaring table
    int table[10][10];


    int sum = 0;
    // loop
    for(int i = 0; i < 10; i++){
        printf("%d table starting 

",i + 1);
        for(int j = 0; j < 10; j++){
             // using addition instead of multiply for better performance
            sum += (i + 1);
            //
            table[i][j] = sum;
            // printing table
            printf("%d x %d = %d 
",i + 1,j + 1,table[i][j]);
        }
        sum = 0;
        printf("
");
    }

}
Comment

a program to print the multiplication table of a given number in c

int n, i;
    printf("Enter a number: ");
    scanf("%d", &n);
    printf("Multiplication table of %d:
 ", n);
    for (i = 1; i <= 10; i++){
        printf("%d x %d = %d
", n, i, n * i);
        }
    return 0;
Comment

PREVIOUS NEXT
Code Example
C :: size of an array c 
C :: C program to count number of digits in a number 
C :: c static 
C :: how to shutdown system c++ 
C :: successeur nombre chaine 
C :: add 2 numbers in c 
C :: how to read space separated words in c 
C :: c for schleife 
C :: block a website on mac 
C :: if statement c short form 
C :: reverse of a string in c 
C :: recursion to convert decimal to binary 
C :: addition in c 
C :: xor swap 
C :: install tweaks ubuntu 
C :: c program to print the multiplication table 
C :: read a document from console in c 
C :: c get current month, year, day 
C :: convert int to char in c 
C :: ** in c 
C :: Passing a matrix in a function C 
C :: c in to str 
C :: gcd and lcd in c 
C :: Installing Tailwind 
C :: faire une facture en langage c 
C :: declaration in c 
C :: stddef.h 
C :: int to void* c 
C :: c defined value sum 
C :: north austin weather 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =