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

Function calling procedures? and their differences? Why should one go for Call by Reference?

624


What is a static variable in c?

659


Explain the bubble sort algorithm.

635


praagnovation

1769


Why is main function so important?

607






A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1693


Explain a file operation in C with an example.

652


What is this infamous null pointer, anyway?

603


What is the use of a static variable in c?

585


Why doesnt long int work?

603


What are the similarities between c and c++?

591


What are structure types in C?

655


What are header files in c programming?

651


What is the process to create increment and decrement stamen in c?

581


What does c mean?

583