C menu-driven program for the arithmetic operations
kw.c
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./a.out ——————————————————————————————————————————— Menu-driven program for the arithmetic operations ——————————————————————————————————————————— 1.Addition 2.Subtraction 3.Multiplication 4.Division 5.Exit ——————————————————————————————————————————— Enter your choice 3 Enter the 1st number 1 Enter the 2nd number 0 Multiplication of 1*0 = 0 ——————————————————————————————————————————— Menu-driven program for the arithmetic operations ——————————————————————————————————————————— 1.Addition 2.Subtraction 3.Multiplication 4.Division 5.Exit ——————————————————————————————————————————— Enter your choice 4 Enter the 1st number 1 Enter the 2nd number 0 Division of 1/0 = inf ——————————————————————————————————————————— Menu-driven program for the arithmetic operations ——————————————————————————————————————————— 1.Addition 2.Subtraction 3.Multiplication 4.Division 5.Exit ——————————————————————————————————————————— Enter your choice 5 kodingwindow@kw:~$
What Next?
C program to perform the Set operations (Union and Intersection)
C program for the Tower of Hanoi
C program to find the factorial of a given number
Advertisement