Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Qutient #1172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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;

}