# Expt. No: 1 16.06.

2010 Program:

PROGRAM 1

/* Program 1 To find the product of two numbers */ # include <stdio.h> # include <conio.h> void main() { int a,b,c; clrscr(); printf("Enter 2 values:"); scanf("%d%d",&a,&b); c=a*b; printf("\nResult:\n%d * %d = %d",a,b,c); getch(); }

Output:
Enter 2 values:55 20 Result: 55 * 20 = 1100

3

clrscr(). getch().279999 3 .600000 * 36.&b). } Output: Enter 2 values:5. printf("\nResult:\n%f * %f = %f".&a. c=a*b.b.299999 = 203.b.6 36.a.c. printf("Enter 2 values:").3 Result: 5.c).Program: /* Program To find the product of two floating numbers */ # include <stdio.h> # include <conio. scanf("%f%f".h> void main() { float a.

} int mul(int x.&b).c.Program: /* Program To find the product of two numbers using function*/ #include <stdio.b). } Output: Enter the 2 numbers: 5 20 The result is: 5 * 20 = 100 3 . getch().&a. c=mul(a.a.c).int).b. scanf("%d%d". printf("Enter the 2 numbers:").h> #include <conio.b. printf("%d * % d = %d". clrscr(). printf("The result is:\n"). void main() { int a.h> int mul(int.int y) { return x*y.