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
sergeinik [125]
4 years ago
9

Write a program that prompts the user to input two numbers—a numerator and a divisor. Your program should then divide the numera

tor by the divisor
Computers and Technology
1 answer:
icang [17]4 years ago
4 0

Answer:

#include <stdio.h>// inclusion of header file.

int main()// definition of main function.

{

  int Quotient,divisor; // declare the two numbers for operation.

  scanf("%d %d",&Quotient,&divisor); // take the user inputs by scanf() function.

  printf("The division result of the number = %f",Quotient/divisor);

// print statement to print the division.

   return 0; // return statement.

}

Output:

  • If the user input is 10 and 9 then the output is 1.
  • If the user input is 4 and 2 then the output is 2.

Explanation:

  • Firstly there is a file inclusion which helps to understand the input and output function
  • Then we declare two variables of integer type which take a value of integer type.
  • Then there is a scanf statement which takes the input from the user. The '%d' format specifies that the value is in an integer value.
  • Then there is a print statement that gives the divisor in floating value. The division operation is written in the printf statement which is used to print the value. '%f' display the value in decimal value.
You might be interested in
What is the full form of ARPANet, WAN,FTP,DCP,HTML,ISP and last WWW​
Lapatulllka [165]

Advanced Research Projects Agency Network,

wide area network

File Transfer Protocol

?

Hypertext Markup Language

Internet service provider

world wide web

6 0
3 years ago
Read 2 more answers
. Suppose an instruction takes 1/2 microsecond to execute (on the average), and a page fault takes 250 microseconds of processor
saul85 [17]

Answer:

a. 100.

b. 31500.

Explanation:

So, we are given the following data which is going to help in solving this particular question.

The time required to execute (on the average) = 1/2 microsecond , a page fault takes of processor time to handle = 250 microseconds and the disk time to read in the page = 10 milliseconds.

Thus, the time taken by the processor to handle the page fault = 250 microseconds / 1000 = 0.25 milliseconds.

The execution time = [ 1/2 microseconds ]/ 1000 = 0.0005 milliseconds.

The number of Pages sent in a second by the disc = 1000/10 milliseconds = 100.

Assuming U = 1.

Hence, the disc transfer time = [2/3 × 1 } + [ 1/3 × 0.25 milliseconds + 15 ] × 2.

=0.667 + 15.083.

= 15.75 millisecond.

Average number of instruction = 15.75/0.0005 = 31500.

8 0
3 years ago
What is the newest code language?​
pickupchik [31]

Answer:

<u>Python 3</u>

Explanation:

The language's latest iteration, Python 3.9, was released on October 5, 2020. It includes even more new features such as relaxed grammar restrictions, flexible function and variable annotations, and new string methods to remove prefixes and suffixes.

5 0
3 years ago
Read 2 more answers
Which statement is true of the digital sound produced by a computer using a<br> lower sample rate?
konstantin123 [22]

Answer:

The digital sound is less likely to match the sound it is copying.

Explanation:

8 0
2 years ago
Write a method called listUpper() that takes in a list of strings, and returns a list of the same length containing the same str
pav-90 [236]

Answer:

//method listUpper takes a list of strings as parameter

public List<String> listUpper(List<String> list)

{ List<String> finalList= new ArrayList<String>();

//finalList is created which is a list to display the strings in upper case

for(String s:list){ //loop iterates through every string in the list and converts each string to Upper case using toUpperCase() method

s = s.toUpperCase();

finalList.add(s); } //finally the upper case strings are added to the finalList

return finalList; } //return the final list with uppercase strings

Explanation:

The method listUpper() works as follows:

For example we have a list of following strings: ("a", "an", "being").

finalList is a list created which will contains the above strings after converting them to uppercase letters.

For loop moves through each string in the list with these strings ("a", "an", "being"). At each iteration it converts each string in the list to uppercase using toUpperCase() and then add the string after converting to uppercase form to the finalList using add() method. So at first iteration "a" is converted to A and added to finalList, then "an" is converted to uppercase AN and added to finalList and at last iteration "being" is converted to BEING and added to finalList. At the end return statement returns the finalList which now contains all the string from list in uppercase form.

3 0
3 years ago
Other questions:
  • PYTHON CODE ONLY:
    7·1 answer
  • Side mirror using convex mirror or concave mirror?​
    5·2 answers
  • After a worksheet has been displayed in page layout view, page breaks are indicated by ________ in normal view.
    14·1 answer
  • What are the reasons why is it necessary to evaluate online sources and content?
    6·1 answer
  • the part of the computer that provides access to the internet is the A.modem B. keyboard C. monitor or D.system unit
    7·2 answers
  • Give a big-O estimate for the number of operations,
    5·1 answer
  • An administrator has just changed the IP address of an interface on an IOS device. What else must be done in order to apply thos
    5·2 answers
  • O
    14·1 answer
  • In the 1760s and early 1770s, the British government wanted to raise money by taxing the residents of its colonies in North Amer
    8·1 answer
  • Graph the functions 8n, 4nlogn, 2n
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!