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

What is string in c language?

1152


what is event driven software and what is procedural driven software?

2571


What is an auto keyword in c?

1097


What is sizeof array?

1056


Explain what are the __date__ and __time__ preprocessor commands?

1118


What would be an example of a structure analogous to structure c?

996


What is %g in c?

1078


What is the difference between null pointer and wild pointer?

1196


Is fortran faster than c?

1042


What are enums in c?

1202


Difference between MAC vs. IP Addressing

1147


write a progrmm in c language take user interface generate table using for loop?

2048


What are # preprocessor operator in c?

1108


What is the use of parallelize in spark?

1030


What are the three constants used in c?

995