c program to print the multiplication table

[ad_1]

multiplication table using c
#include 

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 : \n");
    scanf(
     printf("Enter Last number from where you want to end multiplication : \n");
    scanf(
  	//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(

        }
        printf("Multiplication has ended of
    }


    return 0;


}
c program to print the multiplication table
#include 
int main(){
    int a, b, c, e;
    printf("Enter table format: \n");
    scanf(
    printf("Enter end of table: \n");
    scanf(
    for(b = 0; b <= e; b++){
        printf(
    }
}
multiplication table in c
#include 
int main()
{
    // declaring table
    int table[10][10];


    int sum = 0;
    // loop
    for(int i = 0; i < 10; i++){
        printf(
        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(
        }
        sum = 0;
        printf("\n");
    }

}

[ad_2]

Please follow and like us:
Content Protection by DMCA.com