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
What is string in c language?
what is event driven software and what is procedural driven software?
What is an auto keyword in c?
What is sizeof array?
Explain what are the __date__ and __time__ preprocessor commands?
What would be an example of a structure analogous to structure c?
What is %g in c?
What is the difference between null pointer and wild pointer?
Is fortran faster than c?
What are enums in c?
Difference between MAC vs. IP Addressing
write a progrmm in c language take user interface generate table using for loop?
What are # preprocessor operator in c?
What is the use of parallelize in spark?
What are the three constants used in c?