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 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

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

multiplication of matrix in c

enter the number of row=3
enter the number of column=3
enter the first matrix element=
1 1 1
8 8 8
3 3 3
enter the second matrix element=
1 1 1
2 2 2
3 3 3
multiply of the matrix=
6 6 6
12 12 12
18 18 18
Comment

PREVIOUS NEXT
Code Example
C :: c modify char array 
C :: c strcat 
C :: c program to print the multiplication table 
C :: how to print sizes of various data types of C 
C :: print short in c 
C :: set value of boolean in c 
C :: extract substring after certain character in flutter 
C :: initialize array c 
C :: sleep function in c 
C :: enable disable audio listener unity 
C :: c read file 
C :: sqlserver insert with set identity 
C :: write a c program to find size of variable 
C :: server client tcp in C 
C :: c in to str 
C :: bubble sort in c 
C :: convert string to int c 
C :: turn a char array into double C 
C :: pygramid program in c 
C :: open with overwrite c 
C :: looping through an array in c 
C :: c add char to char array 
C :: nested while loop in c 
C :: writing structures in c 
C :: C Syntax of struct 
C :: C Syntax of return statement 
C :: parcel-builder put image in sub folder 
C :: User input in struct 
C :: C Assigning addresses to Pointers 
C :: table de hachage en c 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =