From b3280935bf6e67cea3f00261c8ebc02943c0d703 Mon Sep 17 00:00:00 2001 From: satvik sawhney <55023423+satviksawhney@users.noreply.github.com> Date: Tue, 14 Jan 2020 13:58:30 +0530 Subject: [PATCH] Create Program to Compute Quotient and Remainder --- .../Program to Compute Quotient and Remainder | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 CalculatorFunctions/Program to Compute Quotient and Remainder diff --git a/CalculatorFunctions/Program to Compute Quotient and Remainder b/CalculatorFunctions/Program to Compute Quotient and Remainder new file mode 100644 index 0000000..26a9229 --- /dev/null +++ b/CalculatorFunctions/Program to Compute Quotient and Remainder @@ -0,0 +1,15 @@ +#include +int main() { + int dividend, divisor, quotient, remainder; + printf("Enter dividend: "); + scanf("%d", ÷nd); + printf("Enter divisor: "); + scanf("%d", &divisor); + // Computes quotient + quotient = dividend / divisor; + // Computes remainder + remainder = dividend % divisor; + printf("Quotient = %d\n", quotient); + printf("Remainder = %d", remainder); + return 0; +}