This is a discussion on Add two numbers without using addition operator within the C and C++ Programming forums, part of the Software Development category; The following program will add two numbers without addtion operator Code: #include<stdio.h> void main() { int a,...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| The following program will add two numbers without addtion operator Code: #include<stdio.h>
void main()
{
int a,b,c;
printf("Enter A value=");
scanf("%d",&a);
printf("Enter B value=");
scanf("%d",&b);
c=a-(-b);
printf("Addition of A & B is =%d",c);
} output Code: Enter A value=10 Enter B value=30 Addition of A & B is =40
__________________ -Murali.. |
| Sponsored Links |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Validating Numbers | ragavraj | PHP Programming | 1 | 11-07-2007 07:12 AM |
| Greatest of Three Numbers Without Using Two Variable | Murali | C and C++ Programming | 1 | 10-29-2007 10:50 PM |
| Greatest of Three Numbers Without Using Relational Operator? | velhari | C and C++ Programming | 4 | 10-25-2007 03:10 AM |
| Phone Numbers in SQL Server – Formatting | Sundaram | Database Support | 0 | 09-21-2007 01:43 PM |
| How to Generate Various types of random numbers using SQLServer ? | Archer | Database Support | 1 | 07-16-2007 02:26 AM |