Computer Science, asked by juliannagonzales0830, 1 year ago

Write a program that prompts the user to input two numbers, a numerator and a divisor. Your program should then divide the numerator by the divisor, and display the quotient and remainder.


Answers

Answered by Anonymous
3

which language bro...????

java/ html/c++ ??? or python????

#sumedhian ❤❤

Answered by AskewTronics
0

The c program for the above question is stated below:

Explanation:

#include <stdio.h>

int main()

{

   int numerator,divisor;

   scanf("%d %d",&numerator,&divisor);

printf("quotient= %d and remainder=%d",numerator/divisor,numerator%divisor);

   return 0;

}

Output:

  • If the user inputs 3 and 2 then the output is 'quotient= 1 and remainder=1'.    
  • If the user inputs 4 and 3 then the output is 'quotient= 1 and remainder=1'.          

Code explanation:

  • Firstly the program takes two inputs for the numerator and divisor variable with the help of scanf function.
  • Then the quotient is print by the help of (/) division operator and the remainder will print by the help of (%) modulo operator

Learn More:

Definition of C Program: https://brainly.in/question/3999878

Similar questions