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 / kadher masthan..,sit

#include <stdio.h>
#include<conio.h>

void main()
{
int a,b,a1,b1,rem=0;
scanf(“%d %d”,&a,&b);


if(a>b)
{
a1=a;
b1=b;
}
else
{
a1=b;
b1=a;
}
while(a1>=b1)
{
rem++;
a1-=b1;
}
printf(" remainder is %d quotient is %d",rem,a1);
}

Is This Answer Correct ?    16 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does everyone say not to use scanf? What should I use instead?

1475


What is C language ?

2020


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1184


What is the purpose of ftell?

1137


If I have a char * variable pointing to the name of a function ..

1232


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

1179


What is the difference between fread buffer() and fwrite buffer()?

1228


What are file streams?

1068


Why C language is a procedural language?

1096


What are the advantages of using new operator as compared to the function malloc ()?

1408


Is c# a good language?

1061


Explain how can you tell whether two strings are the same?

1079


Can you subtract pointers from each other? Why would you?

1009


which is conditional construct a) if statement b) switch statement c) while/for d) goto

1268


What is exit() function?

1075