Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why is c so important?

1103


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.

2150


write a program to create a sparse matrix using dynamic memory allocation.

4956


Explain a pre-processor and its advantages.

1190


What is the use of sizeof?

1064


What is a stream in c programming?

1232


Which programming language is best for getting job 2020?

1101


Write a program of advanced Fibonacci series.

1205


What is define c?

1156


Write a program to print ASCII code for a given digit.

1128


What is a function simple definition?

1166


can we implement multi-threads in c.

1178


What functions are used for dynamic memory allocation in c language?

1215


What is void c?

1163


What does nil mean in c?

1348