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

A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none

1254


Why malloc is faster than calloc?

1072


When should I declare a function?

1148


What are examples of structures?

1118


What is the code in while loop that returns the output of given code?

2001


Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1112


List a few unconditional control statement in c.

991


What are keywords in c with examples?

1091


What is a keyword?

1173


what are enumerations in C

1164


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1118


What is null pointer constant?

1176


How can this be legal c?

1091


How do you determine a file’s attributes?

1090


What are comments and how do you insert it in a C program?

1255