Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

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);
}
 
PREVIOUS NEXT
Tagged: #multiplicationin
ADD COMMENT
Topic
Name
9+3 =