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
How to compare array with pointer in c?
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
Explain main function in c?
How can I send mail from within a c program?
what are bit fields in c?
What is break statement?
What is dynamic variable in c?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Who developed c language and when?
How to establish connection with oracle database software from c language?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What are enums in c?
When we use void main and int main?
What is a program flowchart?
Is null a keyword in c?