Sum of two numbers

Sum of two numbers

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn C programming concepts. You can learn C language at your own speed and time. One can learn concepts of C language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

Sum of two numbers
Sum of two numbers

That C code is a great example of a simple program that takes user input, performs a calculation, and then prints the result. The code successfully prompts the user for two integers, adds them together, and displays the sum.

Program:Sum of two numbers

/*    Sum of two Variable    */
#include<stdio.h>
int main()
{
int var2;
int var1;
int var3;printf(“Type your frist value to add : “);
scanf(“%i”,&var1);
printf(“Type your second value to add : “);
scanf(“%i”,&var2);
var3 =var2+var1;
printf(“Total of your value =  %i”,var3);
return 0;
}

 

 

Leave a Reply

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