Example 1: C program to demonstrate the use of functions
kw.c
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./a.out Addition 5.483000 kodingwindow@kw:~$
Example 2: C program to demonstrate the use of functions
kw.c
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./a.out Enter the 1st Number 55 Enter the 2nd Number -10 Addition 45.000000 kodingwindow@kw:~$
Example 3: C program to demonstrate the use of functions
kw.c
Output
kodingwindow@kw:~$ gcc kw.c
kodingwindow@kw:~$ ./a.out ——————————————————————————————————————————— Program to perform the arithmetic operations ——————————————————————————————————————————— Enter the 1st number 1 Enter the 2nd number 0 Addition | 1.000000 Subtraction | 1.000000 Multiplication| 0.000000 Division | inf ——————————————————————————————————————————— kodingwindow@kw:~$
What Next?
C menu-driven program for the arithmetic operations
C program to perform the Set operations (Union and Intersection)
C program for the Tower of Hanoi
Advertisement