1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vilka [71]
4 years ago
10

Write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a divisor (denominator). Your p

rogram should then divide the numerator by the denominator, and display the quotient followed by the remainder.Hint: If you use division (/) to calculate the quotient, you will need to use int() to remove the decimals. You can also use integer division (// ), which was introduced in Question 10 of Lesson Practice 2.3.Once you've calculated the quotient, you will need to use modular division (%) to calculate the remainder. Remember to clearly define the data types for all inputs in your code. You may need to use float( ) , int( ), and str( ) in your solution.float( ): Anything inputted by a user should be transformed into a float — after all, we are accepting ALL positive numbers, integers and those with decimals.int( ): When you divide the numerator and the divisor using /, make sure that the result is an integer.str( ): After using modular division, you can transform the quotient and remainder back into strings to display the result in the print() command.
Computers and Technology
1 answer:
Paha777 [63]4 years ago
7 0

Answer:

did you end up getting an answer

Explanation:

You might be interested in
What does this comparison block indicate?
natima [27]

Answer:

This comparison block indicates that the comparison is true if the left side is equal to the right side.

Explanation:

The comparison uses the = operator, which is the assignment operator in most programming languages. This operator is used to assign a value to a variable. In this case, the comparison is checking whether the value of the getItem variable is equal to 5. If the value of getItem is equal to 5, then the comparison will evaluate to true. If the value of getItem is not equal to 5, then the comparison will evaluate to false.

5 0
1 year ago
The winning design is typically that which most closely meets the design
zimovet [89]

when the when the when the add the when are you is id god his gay for your top off jack dafe cafe read line green red whats the answerAnswer:

when the when the when the add the when are you is id god his gay for your top off jack dafe cafe read line green red whats the answer

Explanation:

7 0
3 years ago
What are important acronyms we use when we talk about the internet? this is for computer science.
vovangra [49]

Answer:

Lol

Brb

Btw

Gtg

Explanation:

I hope this helps

7 0
3 years ago
1. What does the word “processing” in data pro- cessing mean?
blsea [12.9K]

Answer:

Word processing is the process of creating and editing documents on a computer. It allows a user to create documents that mimic the format and style of a typical typewriter. It requires a computer and word processing software. A printer may also be used to create a physical copy of the document.

Explanation:

6 0
3 years ago
Read 2 more answers
Write an application that inputs a five digit integer (The number must be entered only as ONE input) and separates the number in
netineya [11]

Answer:

The program in Java is as follows:

import java.util.*;

public class Main{

public static void main(String[] args) {

 int n, num;

 Scanner input = new Scanner(System.in);

 System.out.print("Number of inputs: ");

 n = input.nextInt();

 LinkedList<Integer> myList = new LinkedList<Integer>();

 for(int i = 0; i<n;i++){

     System.out.print("Input Integer: ");

     num = input.nextInt();

     while (num > 0) {

     myList.push( num % 10 );

     num/=10;

     }

     while (!myList.isEmpty()) {

         System.out.print(myList.pop()+" ");

     }

     System.out.println();

     myList.clear();

 }

}

}

Explanation:

This declares the number of inputs (n) and each input (num) as integer

 int n, num;

 Scanner input = new Scanner(System.in);

Prompt for number of inputs

 System.out.print("Number of inputs: ");   n = input.nextInt();

The program uses linkedlist to store individual digits. This declares the linkedlist

 LinkedList<Integer> myList = new LinkedList<Integer>();

This iterates through n

 for(int i = 0; i<n;i++){

Prompt for input

     System.out.print("Input Integer: ");

This gets input for each iteration

     num = input.nextInt();

This while loop is repeated until the digits are completely split

     while (num > 0) {

This adds each digit to the linked list

     myList.push( num % 10 );

This gets the other digits

     num/=10;

     }

The inner while loop ends here

This iterates through the linked list

     while (!myList.isEmpty()) {

This pops out every element of thelist

         System.out.print(myList.pop()+" ");

     }

Print a new line

     System.out.println();

This clears the stack

     myList.clear();

 }

8 0
3 years ago
Other questions:
  • Question # 6
    13·1 answer
  • Is a factory-formatted hard disk split into a fixed number of files?
    14·1 answer
  • Paulene is using this table in Word,and she started with the cursor in the box that read “Flavor”. she then hits Alt+End,The the
    7·1 answer
  • I need HELP ASAP! 30 POINTS to the RIGHT answer.
    12·2 answers
  • Conformity is the acceptance of culturally approved goals and the means for achieving these goals.
    6·2 answers
  • Program for bit stuffing...?
    9·1 answer
  • Why do we have to watch a video to get answers?
    7·2 answers
  • What is the unofficial name given to the culture that has emerged from living in the age of digital media, whereby people are fr
    7·2 answers
  • Do you think<br> brain uploading<br> is a good idea?
    7·1 answer
  • Open excel program then use the (IF) function to fill the column of (Expensive/Cheap) then save your
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!