C programming (Simple addition of variables using Math function)


So well in this post i will going to share my source code that i just wrote on how you can use Variables, and maths functions to so simple addition calculation.

#include <stdio.h>
#include <conio.h>

int main(void)
    int num1,num2,sum;// Defining variables
    printf ("Enter the first value : ");// To print on screen
    scanf ("%d",&num1); // scanf use for inputting and storing data in variable 
    printf ("Enter the second value : ");// To print on screen
    scanf ("%d",&num2);
    sum=num1+num2; // Math funtion for Addition 
    printf ("The sum is : %d\n",sum); // Funtion to Print Sum of two variables

Leave a Reply

Your email address will not be published. Required fields are marked *