answersLogoWhite

0


Best Answer

Yes.

int a, b;

a= 2;

b= 3;

a= a+b;

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you write addition of 2 no program without using third variable?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write a program in C plus plus plus plus How do you write a program in C to swap two variables without using the third oneo swap two variables without using the third one?

To swap two variables without using a third variable, use exclusive or manipulation... a ^= b; b ^= a; a ^= b;


Swapping without third variable?

There are two ways in which you can swap without a third variable. 1. Using xor operation swap( int *a, int *b) { *a = *a ^ *b; *b = *a ^ *b; *a = *a ^ *b; } 2. Using addition and subtraction swap( int *a, int *b) { *a = *a + *b; *b = *a - *b; *a = *a - *b; } }


What is program in c to swap entered two numbers without using third variable?

The required c program is given below /*Swapping(interchange) the two entered numbers*/ #include<stdio.h> main() { /*Without using third variable*/ int a,b,t; printf("Enter a:"); scanf("%d",&a); printf("Enter b:"); scanf("%d",&b); a=a+b; b=a-b; a=a-b; printf("\n After swapping without using third variable"); printf("\na=%d\nb=%d",a,b); }


Swap logic without using third variable?

a ^= b; b ^= a; a ^= b;


Program in c using pointers to interchange 2 values without using third variable?

swap (int *pa, int *pb) { *pa ^= *pb; *pa ^= *pa; *pa ^= *pb; }


How do you swap in c programming?

the simple way can be explained by example as: let there be two integers as : int a=10,b=5; if we want to use third variable then let third variable be int c; and sorting is done as : c=a; a=b; b=c; if it is to be done by without using third variable then : a=a+b; b=a-b; a=a-b; at last the variable is sorted.


What is moderating variable?

Moderation occurs when the relationship between two variable depends on a third variable. The third variable is referred to as the moderate variable or simply the moderator


Cheats on how to get clubpenguin cloths if your not a member?

Without using a third party cheating program, unfortunetly, is impossible.


Are there any third party brokers who provide ing variable annuities?

Yes there are many third party brokers who are willing to provide ING variable annuities. Third party brokers are the most common at providing ING variable annuities.


Write a program for two variables without using third variable in c plus plus?

#include <stdio.h> int main (void) { char *first= "Hello"; int second = 12; printf ("first=%s, second=%d\n", first, second); return 0; }


How do you change internet settings to display currencies in your local currency?

You cannot do that, without some third-party program.


How do you change internet settings to display currency in ZAR?

You cannot do that, without some kind of third-party program.