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
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
Why malloc is faster than calloc?
When should I declare a function?
What are examples of structures?
What is the code in while loop that returns the output of given code?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
List a few unconditional control statement in c.
What are keywords in c with examples?
What is a keyword?
what are enumerations in C
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What is null pointer constant?
How can this be legal c?
How do you determine a file’s attributes?
What are comments and how do you insert it in a C program?