Computer Science, asked by DianaDaruwala08, 20 days ago

Write a program to assign two numeric values , and then calculate and display its product

Answers

Answered by SOMEBRXTHX
0

Answer:

Program to Multiply Two Numbers

printf("Enter two numbers: "); scanf("%lf %lf", &a, &b); Then, the product of a and b is evaluated and the result is stored in product . product = a * b; Finally, product is displayed on the screen using printf() .

Answered by lalitmandrai
0

a program to assign two numeric values , and then calculate and display its product

Program

#include <stdio.h>

int main() {

double a, b, product;

printf("Enter two numbers: ");

scanf("%lf %lf", &a, &b);

// Calculating product

product = a * b;

// %.2lf displays number up to 2 decimal point

printf("Product = %.2lf", product);

return 0;

}

Output

Enter two numbers: 2.4

1.12

Product = 2.69

Similar questions