Wednesday, April 24, 2019

Subtraction of two numbers in C

Subtraction of two numbers in C


Explain:
Subtraction of two numbers in C . you need to know variables and data types . So a,b,c are three variables and your data types integer an a assign a = 20 , b = 10 , and c = a - b. , Then we used printf function for our out put. source code given below.


//www.programizbasic.blogspot.com
#include <stdio.h>

int main()
{
    int a,b,c;
    a = 10;
    b = 20;
    c = a - b;
    printf("\n");  //use for line break

    printf("Subtraction of two numbers : %d",c);

    printf("\n");  //use for line break

    return 0;

}
OUTPUT of Subtraction of two numbers in C





click here for  Addition of two numbers in c . 
Are you beginner in programming go here and know about C programming .


No comments:

Post a Comment

Post Top Ad

Pages