How to add two integers in c programming - Learn C Programming From Basic

Latest

A Place Where You Will Learn Easily C Languages.

Recent Post

BANNER 728X90

Tuesday 10 September 2019

How to add two integers in c programming




Salam o alaikum friends. In this video tutorial we are talking about how to add two integers in c programming.  I'm also sharing this code with your at below link. if you like this video please like video and subscribe our channel. If you have any query you can comment below. We will try to solve your problem as quick as possible. 

Program Explanations:
1. You need minimum three variables to add two integers that are a,b and c.
2. You can store number 1 in a and number 2 in b And Store Addition of a and b in c.

== > You can also make calculator after watching this video by creating your own logic.

How to add two integers in c programming

#include<conio.h>
#include<stdio.h>
int main()
{
int a,b,c;
printf("Enter Num 1: ");
scanf("%d", &a);
printf("Enter Num 2: ");
scanf("%d", &b);
c=a+b;
printf("Addition of %d and %d is %d",a,b,c);
getch();
}

If you want to Watch video and understand how its works then please watch our video below.

No comments:

Post a Comment