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
Why is c so important?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
write a program to create a sparse matrix using dynamic memory allocation.
Explain a pre-processor and its advantages.
What is the use of sizeof?
What is a stream in c programming?
Which programming language is best for getting job 2020?
Write a program of advanced Fibonacci series.
What is define c?
Write a program to print ASCII code for a given digit.
What is a function simple definition?
can we implement multi-threads in c.
What functions are used for dynamic memory allocation in c language?
What is void c?
What does nil mean in c?