This is a C program using function with no argument no return value.
Source Code:
- #include<stdio.h>
- #include<conio.h>
- void add();
- //main....
- int main()
- {
- //calling function.
- add();
- getch();
- }
- //function prototype.
- void add()
- {
- int a,b,add;
- printf("GFive value:");
- scanf("%d %d", &a,&b);
- add =a+b;
- printf("addition is =%d",add);
- }
Output:
1. Give value:5 10
Addition is =15
2. Give value:48 98
Addition is =146
0 comments:
Post a Comment