12
Q:

multiplication in c

//use the "*"

/*var*/ * /*var*/;
0
int main()
{
	int a = 5;
	int b = 3;
	int num = a * b;
    printf("%d", num);
}
0
// Program to multiply 2 numbers from user inputs

#include <stdio.h>
int main() {
    double a, b, product;
    printf("Enter two numbers: ");
    scanf("%lf %lf", &a, &b);  
 
    // Calculating product
    product = a * b;

    // Result up to 2 decimal point is displayed using %.2lf
    printf("Product = %.2lf", product);
    
    return 0;
}
0

New to Communities?

Join the community