Tuesday, 20 March 2012

C Program to add two numbers without using plus('+') operator


/*perform addtion of two integer without using plus ("+") sign*/
#include<stdio.h>
void main()
 {
          int a=10,b=20;
          while(b--)//decrease value of b one by one and increase the value of a
          {
            a++ ;
          }    
    printf("Sum of two number is=>%d",a);
 }

No comments:

Post a Comment

Compiler for C,C++ and Python {paste your programme to see the output}