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

what are enumerations in C

1160


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1066


Differentiate between null and void pointers.

1162


what is the difference between 123 and 0123 in c?

1201


What are operators in c?

1022


Which header file is used for clrscr?

1051


What is structure padding in c?

1128


Explain that why C is procedural?

1136


what is recursion in C

1060


How can I change their mode to binary?

1108


Is null equal to 0 in sql?

1146


Is it better to use malloc() or calloc()?

1106


What are structure types in C?

1096


What is the stack in c?

1130


what is a constant pointer in C

1149