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

multiplicationin c

/*Program for multiplying two numbers*/
#include <stdio.h>
int main(){
	int a, b, Product; //declare the variables that will be used, a will store the first number, b second number and Product, product.
    printf("Enter the first number: 
"); //Prompts user to enter the first number.
    scanf("%d", &a);//Accepts input and saves it to variable a
    printf("Enter the second number: 
");
    scanf("%d", &b);
    sum = a * b; //Formular to multiply the two numbers.
    printf("Product is %d
", product);
}
Comment

multiplication operator in c

int main()
{
	int a = 5;
	int b = 3;
	int num = a * b;
    printf("%d", num);
}
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

PREVIOUS NEXT
Code Example
C :: mutex c 
C :: c check if char is an operator 
C :: c program to find minimum of 4 numbers using conditional operator in c 
C :: How to change an array in a function in c 
C :: char array to int c 
C :: c syntax 
C :: Area of a Circle in C Programming 
C :: Hello world in C programming language 
C :: convert int to string c 
C :: read a document in c getting name from console 
C :: what is syntax in programming 
C :: sleep function in c 
C :: convert int to char in c 
C :: grepper vscodium 
C :: functions in c 
C :: simple bootstrap form example 
C :: create array of strings in c from user input 
C :: dynamic memory allocation c 
C :: rust cross compile 
C :: rfid rc522 code 
C :: imprimir matriz 
C :: delay in c programming for linux 
C :: how to arrange a 2d array based on string length in c 
C :: enum case statement in c 
C :: oracle trunc 
C :: c functions 
C :: C Pass Individual Array Elements 
C :: allocating memory for 1Mb text file in C 
C :: How to include multiline conditional inside template literal 
C :: send an array through a pipe 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =