In this article we learn how to add two number in c.
Let’s write a program which add two numbers in c.
Step 1: Let’s open turbo c and write following code:
// Adding preprocessor file
// delcare variable
printf(“enter value of a and b”);
// assign value in variable a and b
// add a and b
//print the result
printf(“The Result is=%d”,c);
Step 2: Save it by pressing F2 and name it Add.cpp and click OK.
Step 3: Now, you have to compile .it means to check errors in programe for successfully run. Click on Compile or press F9.
Step 4: Run the program. Press ALT+R and see the output.