C program of multiplication and division of two number

Hi there!

    this is a tutorial about the program of multiplication and division of two numbers in the C language.

techbincloud.blogspot.com

these are basic programs in the C language.

for better understanding just look at the algorithm of the program of multiplication of two numbers


          Algorithm of multiplication of two numbers

Step 1: start

Step 2: Read data

              Input a,b,c 

Step 3: multiply a and b and assign to c

      3.1: C<--a*b

Step 4: display c

Step 5: stop


Program

#include #include int main() { int a,b,c; printf("enter a number : "); scanf("%d",&a); printf("enter a number :"); scanf("%d",&b); c=a*b; printf("Given numbers :%d,%d",a,b); printf("\n"); printf("multiplication of two numbers are :%d",c); getch(); return 0; }

Output

techbincloud.blogspot.com
output of program


            Algorithm of the division of  two numbers

Step 1: start

Step 2: Read data

              Input a,b,c 

Step 3: multiply a and b and assign to c

      3.1: C<--a/b

Step 4: display c

Step 5: stop


Program

#include #include int main() { float a,b,c; printf("enter a number : "); scanf("%f",&a); printf("enter a number :"); scanf("%f",&b); c=a/b; printf("Given numbers :%f,%f",a,b); printf("\n"); printf("Division of two numbers are :%f",c); getch(); return 0; }

Output 

techbincloud.blogspot.com
the output of the program


ok, if you have any doubt feel free to contact us. if you want any program in C language please comment we will try our level best.                                    

              Thank you for visiting.

Post a Comment

0 Comments