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 / y hussain reddy

void main()
{
int a,b;
int c=0;
printf("nter a,b");
scanf("%d %d ",&a,&b);
while(a>=b)
{ c++;
a=a-b;
}
printf("a/b=%d",c);
printf("a%b=%d",a);
}

Is This Answer Correct ?    12 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

2256


Explain what are preprocessor directives?

1014


develop algorithms to add polynomials (i) in one variable

2108


Write a C program to count the number of email on text

1853


What is unsigned int in c?

932


How can you pass an array to a function by value?

1056


What is a pointer variable in c language?

1036


Which header file is essential for using strcmp function?

1422


Can 'this' pointer by used in the constructor?

1043


What is string concatenation in c?

1026


Why c is known as a mother language?

1036


How does #define work?

1011


How can you access memory located at a certain address?

1061


How can I generate floating-point random numbers?

1041


Simplify the program segment if X = B then C ← true else C ← false

2960