Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions Qutient
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#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: %d\n", quot);

printf("Remainder is: %d", rem);

return 0;

}