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;
}



Write a program to draw a line

/* ***********************************************
    Write a program to draw a line

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

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

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

int main()
{
    drawline();
    return 0;
}


int drawline(void)
{
    int i;
    for(i=0;i<80;i++)
    {
        printf("-");

    }


}




python class topic video