int a = 1 + 2;
----------
int a = 1;
int b = 2;
a += b;
Not possible. Of course you can call a function which does the addition for you, but function-calling is also an operator in C.
substracion of any two number program in c
sum = a + b + c;
You do not need a header file to add two numbers in C. You do need the header files if you want to use the run-time library, which includes the ability to format and display the result.
#include<iostream.h> #include<conio.h> void main() { int a, b, c; clrscr(); cout<<"enter the two numbers"; cin>>a; cin>b; c=a+b; cout<<"Addition of two numbers="<<c; getch(); }
Get the input of two numbers from the user.a,bAdd those two numbers and store the value in another variable.c=a+b;print the value c
You can also have any numbers like (a + c) and (b - c), where "c" is the irrational part, and "a" and "b" are rational.
The native C language will not permit the addition of two 100 digit numbers with native data types. Therefore, you need to simulate the 100 digit numbers differently, and that can be done various ways, including using an arbitrary precision math package, or BCD arithmetic, etc.
The following arithmetic operators are available in c:+ - addition -> used to add two numbers- - subtraction ->used to subtract two numbers* - multiplication ->used to multiply two numbers/ - division -> used to divide two numbers% - modulus -> used to determine the remainder when two numbers are divided. a%b return the remainder when a is divided by b(can be used with only integer data types).
There are an infinite number of such pairs. If a + b = 10 where a and b are rational, and if c is any irrational number, then x = a+c and y = b-c are both irrational numbers and x + y = a+c+b-c = 10
C is a programming language. Example of C or C++ Programing would be the following: add matrices, get ip address, and read files.
The question is malformed and incomprehensible.