Computer Science, asked by hoorkhan2143, 7 days ago

write a c program to declare 2 variables and add them

Answers

Answered by garimashukla457
1

Answer:

#include<stdio.h>

#include<conio.h>

void main()

{

int a=2,b=3,add=0;

clrscr();

scanf("%d",$a,$b);

add=a+b;

printf("%d",add);

}

Explanation:

first of all we will take two header files then the program will start from void main we will take two variables and then we have to assign them any value, clrscr is used to clear your output screen and the we will use scanf to take the values of those variables(a,b) and after it we will assign the value of a+b to add and print the add through printf function.

Similar questions