Wednesday, June 5, 2019

Write a program to add two numbers using functions

/* ***********************************************
    Write a program to add two numbers using functions

 date:06-06-2019
 created by:ANIL DURGAM

*****************************************************/


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a,b,c;
    printf("please enter two numbers\n");
    scanf("%d%d",&a,&b);

    c=sum(a,b);
    printf("sum=%d",c);
    return 0;
}
int sum(int a, int b)
{
    int c;
    c=a+b;
    return c;
}



No comments:

Post a Comment

python class topic video