Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

difference of two no's with out using - operator

Answer Posted / vignesh1988i

its simple logic , wat i think is to AND these two inputs.

#include<stdio.h>
#include<conio.h>
void main()
{
int n,m;
scanf("%d %d",&m,&n);
if(m>n)
printf("%d",m&n);
else
printf("%d",n&m);
getch();
}

thank u

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I trap or ignore keyboard interrupts like control-c?

1055


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1991


Why do we use main function?

1166


What is sizeof int?

1077


What is an auto keyword in c?

1084


If the size of int data type is two bytes, what is the range of signed int data type?

1014


What is "Duff's Device"?

1154


How macro execution is faster than function ?

1173


What are directives in c?

954


i have a written test for microland please give me test pattern

2723


What is the code in while loop that returns the output of given code?

1961


What is array within structure?

1101


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2449


how to write optimum code to divide a 50 digit number with a 25 digit number??

3258


What is a pointer value and address in c?

1109