Posts

Showing posts with the label printf and scanf in c

How to add two numbers in C programming language

Image
  How to add two numbers in C programming language In this blog post we will learn that how can we add two numbers, and then assign the result of those two numbers to any variable. Before going to the coding examples we will look at at basics of C programming language that helps us to add two numbers and show their result on the console screen. Before diving deep into the coding examples, let us walk through some key points. When we start to learn any programming language we usually start with some basic syntax of the language and after that we go through some basic programs like Hello World program , or print a number or simply show the addition of two numbers . For this purpose we normally look at, how can we take an input from the user and after that we perform some operations on the input data using math operations.  Basic syntax and format of C programming language In C programming language in order to make input / output operations we mainly use two functions wh...