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
laila [671]
3 years ago
6

The price of an item you want to buy is given in dollars and cents. You pay for it in cash by giving the clerk d dollars and c c

ents. Write specifications for a function that computes the change, if any, that you should receive. Include a statement of purpose, the preconditions and postconditions, and a description of the arguments.
Computers and Technology
1 answer:
RSB [31]3 years ago
7 0

Answer:

Get the actual price of the item and convert it to cents, also get and convert the amount paid to cents.

subtract the actual price of the item from the paid amount ( which is in cents), if the result is greater than zero, covert the result back to dollars and output the result.

Explanation:

The program converts the actual price of the item and the amount paid to cents (where a dollar is equal to 100 cents). The variables are subtracted to get the change to be refunded, the result is converted back to dollars as the actual change to be paid.

You might be interested in
Assume that name has been declared suitably for storing names (like "amy" , "fritz" and "moustafa") write some code that reads a
tamaranim1 [39]
Name = "Bob"
# or you can prompt the user to enter their name:
# name = input("What's your name? ")

print("greetings," , name)
3 0
3 years ago
The ratio of boys and girls is 4:5 calculate the number of boys if the are 1080 learners in schools​
inna [77]

Explanation:

The ratio of Boys =  4x

The ratio of  Girls =  5x

The Number of Boys in the School = 4x + 5x = 1080

                                                          =         9x = 1080

                                                          =           x  = 1080/9

<em>                                                          </em> =           x  = 120

The ratio of Boys = 4x  = 4 x 120 = <em>480</em>

The ratio of  Girls =  5x = 5 x 120 = 600

<u></u>

Answer :-   <u><em>The ratio of Boys =480</em></u>

                 

8 0
3 years ago
A block signature indicating that a text message was typed on a mobile device is an example of ____________.
Katarina [22]

A block signature indicating that a text message was typed on a mobile device is an example of  <u>impression management</u>.

The correct option is A.

<h3>What is  impression management?</h3>

Impression management is a conscious or unconscious process whereby individuals strive to regulate and control information in social interactions in order to affect how others perceive a person, an item, or an event.

<h3>What is the main goal of impression management?</h3>

The actions people take to influence others' perceptions of a notion are referred to as impression management. Depending on their objectives, people can work to reinforce existing beliefs or make an effort to change them.

<h3>What is block signature?</h3>

A signature block is the text that surrounds a signature and offers context for the signature as well as additional details. An email message, Usenet article, or forum post's signature block is a customized block of text that is automatically attached at the bottom of these types of documents.

To know more about  block signature visit:

brainly.com/question/2123747

#SPJ4

I understand that the question you are looking for is :

A block signature indicating that a text message was typed on a mobile device is an example of ____________.

A. impression management

B. convergence

C. evaluative language

D .pragmatic rules

6 0
2 years ago
Programming challenge description: Given a string comprising just of the characters (,),{,},[,] determine if it is well-formed o
nadezda [96]

Answer:

Employing Java language,

Explanation:

//for using stack data structure

import java.util.Stack;

//class definition

public class BracketMatch {

   //function to find the string is well formed or not

   public static boolean isWellFormed(String str) {

       //variable to store the character value

       char ch;

       //check if the first character itself is the end of the brackets

       if (str.charAt(0) == ')'||str.charAt(0) =='}'||str.charAt(0) ==']')

           return false;

       //creating a stack of character type

       Stack<Character> stack = new Stack<Character>();

       //iterating through the characters in string

       for(int i=0; i < str.length(); i++) {

           //storing the current character from the string in the variable

           ch = str.charAt(i);

           if(ch == '('||ch=='{'||ch=='[')

               //if the character is starting of the brackets push it into stack

               stack.push(ch);

           else if(ch == ')')

               //if it is closing bracket and the stack is empty then the string is not well formatted

               if(stack.empty())

                   return false;

               else if(stack.peek() == '(')

                   stack.pop();

               else

                   return false;

           else if(ch == '}')

               if(stack.empty())

                   return false;

               else if(stack.peek() == '{')

                   stack.pop();

               else

                   return false;

       }

       //returning the stack content, if the string will be well formed the stack would be empty

       //after all the operations

       return stack.empty();

   }

   //main method

   public static void main(String[] args) {

       //calling function to find if the string is welll formatted or not

       System.out.println(isWellFormed("{}"));

       //calling function to find if the string is welll formatted or not

       System.out.println(isWellFormed("([)]"));

   }

}

5 0
3 years ago
A _____ miniature battery operated transmitter that can be propelled through a non-metallic pipe or purpose of locating
Anna11 [10]
I think it is the model ET-2. Not quite sure.
7 0
3 years ago
Other questions:
  • Default tab stops are set in Word every _______ inch.<br> a. ¾<br> b. 1<br> c. ½<br> d. ¼
    13·1 answer
  • Which fingers do you use to type the following letters rtgvf
    11·1 answer
  • The following 2D array has been created:
    12·2 answers
  • What sugar is used in a DNA molecule​
    7·2 answers
  • Identify the computer cycle in each of the descriptions below by choosing the answer from the
    12·1 answer
  • Quiz
    6·2 answers
  • (a) Convert to hexadecimal: 1457.1110. Round to two digits past the hexadecimal point.
    8·1 answer
  • Which of the following accessories would you use to create a drawing? A. Calculator B. Notepad C. Paint D. WordPad
    14·2 answers
  • Cyberbullying can negatively impact a victim’s <br> well-being.
    13·1 answer
  • This is an example of what type of formula? =average(d1:d17) question 1 options: addition subtraction range average
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!