program to get the remainder and quotant of given two
numbers with out using % and / operators?

Answer Posted / y hussain reddy

void main()
{
int a,b;
int c=0;
printf("nter a,b");
scanf("%d %d ",&a,&b);
while(a>=b)
{ c++;
a=a-b;
}
printf("a/b=%d",c);
printf("a%b=%d",a);
}

Is This Answer Correct ?    12 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of sizeof?

561


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

673


What are the __date__ and __time__ preprocessor commands?

580


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

1923


What is the 'named constructor idiom'?

645






Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

1662


In C programming, how do you insert quote characters (‘ and “) into the output screen?

900


Explain do array subscripts always start with zero?

767


Can 'this' pointer by used in the constructor?

617


What is return in c programming?

521


How do you determine a file’s attributes?

610


What is use of integral promotions in c?

670


What is meant by type specifiers?

666


Why is c known as a mother language?

751


what is the significance of static storage class specifier?

1669