program to get the remainder and quotant of given two
numbers with out using % and / operators?
Answer Posted / suma
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,i,remaider,q;
i=0;
printf("Enter two numbers\n");
scanf("&d,&d",x,y);
do
{
x=x-y;
i=i+1;
}while(x>=y)
if (x<y)
{
remainder=x;
q=i;
}
printf("the remainder is ",x);
printf("the quotient is ",q);
}
| Is This Answer Correct ? | 8 Yes | 7 No |
Post New Answer View All Answers
what are enumerations in C
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
Differentiate between null and void pointers.
what is the difference between 123 and 0123 in c?
What are operators in c?
Which header file is used for clrscr?
What is structure padding in c?
Explain that why C is procedural?
what is recursion in C
How can I change their mode to binary?
Is null equal to 0 in sql?
Is it better to use malloc() or calloc()?
What are structure types in C?
What is the stack in c?
what is a constant pointer in C