c program to subtract between two numbers without using '-'
sign and subtract function.

Answer Posted / pm

say, x-y
{
for (int i=y;i>=0;i--)
x--;
cout<<x;
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is using exit() the same as using return?

667


Can you write the algorithm for Queue?

1546


What is wrong with this program statement? void = 10;

811


What is array within structure?

578


What is the difference between functions getch() and getche()?

613






Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1463


What is use of bit field?

763


What is the purpose of 'register' keyword in c language?

622


Is it fine to write void main () or main () in c?

541


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

1672


Can you pass an entire structure to functions?

688


#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }

708


What is the full form of getch?

577


What is the difference between int main and void main in c?

589


Is c++ based on c?

644