Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

Program To Find the sum of two numbers inputted by user


Here, we practice main function as a returning value, so we kept int main for returning some value. This program will take two numbers from user of the program and put it in a and b variable. For input we have used scanf. The specifier %d inside scanf denoted certain value to be put in a and b. After processing, the result is displayed. We return 0 value for ensuring that the programing ran sucessfully.



Output

Here the input is given by using comma, just like the comma used in program inside scanf.

Exercise:

Find out difference of any two numbers given by the user.
Share:

No comments:

Post a Comment

If you have any doubt, let me know...

Translate

Wikipedia

Search results