Hi companion you might feel somewhat unsure about C Program to Find Remainder and Leftover portion We trust this article fills in every one of the questions in the article. We should return to the article.
C Program to Find Quotient and Remainder
#include <stdio.h>
int main(){
int num1, num2, quot, rem;
printf("Enter dividend: ");
scanf("%d", &num1);
printf("Enter divisor: ");
scanf("%d", &num2);
/* The "/" Arithmetic operator returns the quotient
* Here the num1 is divided by num2 and the quotient
* is assigned to the variable quot
*/
quot = num1 / num2;
/* The modulus operator "%" returns the remainder after
* dividing num1 by num2.
*/
rem = num1 % num2;
printf("Quotient is: %dn", quot);
printf("Remainder is: %d", rem);
return 0;
}
Final Words
C Program to Find Remainder and Remaining portion the article will fulfill every one of your questions.