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 does *p++ do?

589


What does main () mean in c?

617


Can you please explain the difference between exit() and _exit() function?

596


what is a constant pointer in C

682


How does placing some code lines between the comment symbol help in debugging the code?

550






What is volatile c?

527


What is break in c?

590


What are multidimensional arrays?

656


How do you determine the length of a string value that was stored in a variable?

652


write a program to generate address labels using structures?

4010


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1635


What is putchar() function?

640


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

677


Which of these functions is safer to use : fgets(), gets()? Why?

637


Tell me can the size of an array be declared at runtime?

601