Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // this program div 2 int's and gives the quotient and remainder
- // 9 and 4 will be used for testing
- #include <stdio.h>
- int A, B, end;
- float end2;
- int main(void) {
- printf("Enter the dividend\n");
- scanf_s("%d", &A);
- printf("Enter the divisor\n");
- scanf_s("%d", &B);
- end = A / B;
- printf("the quotient is ");
- printf("%d", end);
- printf("\n");
- end2 = A % B;
- printf("the remainder is ");
- printf("%f", end2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement