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
Anna35 [415]
3 years ago
7

Module main() //Declare local variables Declare Real restaurantSales //Set gratuity tax rate as 10 percent Declare Real salesTax

Rate=10 Declare Real restaurantTaxes Declare Real expectedGratuities //Set gratuity tax rate as 8 percent Declare Real gratuityTaxRate=8 Declare Real gratuityTax //call getRestaurantTax module getRestaurantTax(restaurantSales, salesTaxRate, restaurantTaxes); //call getGratuitiesTax module getGratuitiesTax(expectedGratuities, gratuityTaxRate, gratuityTax); //call display module display(restaurantSales, restaurantTaxes, expectedGratuities, gratuityTax) End Module Module getRestaurantTax(real restaurantSales, real salesTaxRate, real ref restaurantTaxes) //calculate the restaurant taxes restaurantTaxes=restaurantSales*(salesTaxRate/100.0) End Module Module getGratuitiesTax(real expectedGratuities, real gratuityTaxRate, real ref gratuityTax) //calculate the gratuities taxes gratuityTax=expectedGratuities*(gratuityTaxRate/100.0) End Module Module display(real restaurantSales,real restaurantTaxes, real expectedGratuities, real gratuityTax) //print the sales ,gratuities to output window Print "Restaurant Sales, $" , restaurantSales Print "Restaurant Taxes, $" , restaurantTaxes Print "Expected Gratuities, $" , expectedGratuities Print "GratuityTax, $" , gratuityTax End Module
Computers and Technology
1 answer:
Nastasia [14]3 years ago
6 0

Answer:

Check the explanation

Explanation:

Program module pseudo code to find the restaurant sales, gratuity tax

Module main()

  //Declare local variables

  Declare Real restaurantSales

//Set gratuity tax rate as 10 percent

  Declare Real salesTaxRate=10

  Declare Real restaurantTaxes

  Declare Real expectedGratuities

//Set gratuity tax rate as 8 percent

  Declare Real gratuityTaxRate=8

  Declare Real gratuityTax

 

  //call getRestaurantTax module

  getRestaurantTax(restaurantSales, salesTaxRate, restaurantTaxes);

  //call getGratuitiesTax module

  getGratuitiesTax(expectedGratuities, gratuityTaxRate, gratuityTax);

  //call display module

  display(restaurantSales, restaurantTaxes, expectedGratuities, gratuityTax)

End Module

Module getRestaurantTax(real restaurantSales, real salesTaxRate, real ref restaurantTaxes)

  //calculate the restaurant taxes

  restaurantTaxes=restaurantSales*(salesTaxRate/100.0)

End Module

Module getGratuitiesTax(real expectedGratuities, real gratuityTaxRate, real ref gratuityTax)

  //calculate the gratuities taxes

  gratuityTax=expectedGratuities*(gratuityTaxRate/100.0)

End Module

Module display(real restaurantSales,real restaurantTaxes, real expectedGratuities, real gratuityTax)

  //print the sales ,gratuities to output window

  Print "Restaurant Sales, $" , restaurantSales

  Print "Restaurant Taxes, $" , restaurantTaxes

  Print "Expected Gratuities, $" , expectedGratuities

  Print "GratuityTax, $" , gratuityTax

End Module

You might be interested in
Which securities protect data through processes, procedures,decisions,and user pernissions. Determines where and how data can be
vovangra [49]

Answer:

Data can be stored on storage devices.

Explanation:

Network security, Application security and information security are the securities that protect data. Data can be stored on storage devices such as hard disk drives, solid state drives, external hard drives, USB flash drives and SD cards etc. Hard disk drives, floppy disks and tapes store data magnetically. The data can be stored with a device that spins the disk with magnetic coatings and heads has the ability to read and write information in the form of magnetic patterns.

5 0
3 years ago
Advertising andpublicity are used to:
WINSTONCH [101]

Answer:

d. All of the given options

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

<u>Advertising and Publicity</u> is used for many reasons.

Retail Companies use advertising and publicity to promote their products and in term increase sales of that product when it hits the shelves.

Meanwhile, other companies such as Law Firms use advertising and publicity create awareness for their law firm and communicate with customers over high profile case etc.

Therefore, the answer is all of the above.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
List 5 ways by which Artificial intelligence (AI) can be used to drive our business.​
andreyandreev [35.5K]

Answer:

start a website

Explanation:

true

5 0
3 years ago
Write a C program to prform simple C aritlimetic calculations. The user is to enter a simple expression(integer operaior integer
larisa86 [58]

Answer:

Here is the C program:

#include <stdio.h>  //to use input output functions

//functions prototype

unsigned int mod(unsigned int a, unsigned int b);  

unsigned int mul(unsigned int a, unsigned int b);  

unsigned int sub( unsigned int a,unsigned int b);

float divide(unsigned int a,unsigned int b);  

unsigned int add( unsigned int a,unsigned int b);  

int main()  {  //start of main method

unsigned int a, b;   //declare variables to store the operands

char d;  //declare variable to store the operator

printf("Enter an operator:  ");   //prompts user to enter an operator

scanf("%c",&d);  //reads the operator from use

getchar();  //gets a character

while (d!='q')   { //keeps iterating until user enters q to quit

printf("Enter 1st operand: ");   //prompts user to enter first operand

scanf("%d",&a);   //reads first operand from user

getchar();  //reads character

printf("Enter 2nd operand: ");   //prompts user to enter second operand

scanf("%d",&b);   //reads second operand from user

getchar();  

if (d=='%')  {   //if the character of operator is a mod

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

mod(a,b);  }  //displays computed modulo of two input operands

if (d=='*')   //if the input character is for multiplication operator

{printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

mul(a,b); }  //displays computed multiplication

if (d=='+')  {  //if the input character is for addition operator

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = "); // displays =

add(a,b);  }   //displays computed addition

if (d=='/')  {  //if the input character is for division operator

printf("%d",a); // prints operand 1

putchar(d);  //displays operator

printf("%d",b);  //displays operand 2

printf(" = ");  //displays =

divide(a,b);  }   //displays computed division

if (d=='-')  {  //if the input character is for subtraction operator

printf("%d",a);  //prints operand 1

putchar(d);  //displays operator

printf("%d",b); // displays operand 2

printf(" = ");  //displays =

sub(a,b);  }  //displays computed subtraction

printf("Enter an operator: ");   //asks again to enter an operator

scanf("%c",&d);  //reads operator from user

getchar();  }  }   //gets character

unsigned int mod( unsigned int a, unsigned int b){  //function to compute modulo of two integers with no sign

     int c = a%b;  //computes mod

    printf("%d",c);  }  //displays mod result

unsigned int add(unsigned int a, unsigned int b){     // function to compute addition of two integers

    int c = a+b; //computes addition

    printf("%d\n",c);  } //displays result of addition

unsigned int mul(unsigned int a, unsigned int b){       //function to compute multiplication of two integers

    int c = a*b;  //multiplies two integers

   printf("%d\n",c); }  //displays result of multiplication

float divide(unsigned int a, unsigned int b){   //function to compute division of two integers

    float c = a/b;  //divides two integers and stores result in floating point variable c

    printf("%f\n",c);  } //displays result of division

unsigned int sub(unsigned int a, unsigned int b){       //function to compute subtraction of two integers

    int c = a-b;  //subtracts two integers

    printf("%d\n",c);  }  //displays result of subtraction

Explanation:

The program is well explained in the comments mentioned with each line of the program. The program uses while loop that keeps asking user to select an operator and two operands to perform arithmetic calculations. The if conditions are used to check what arithmetic calculation is to be performed based on user choice of operand and calls the relevant function to perform calculation. There are five functions that perform addition, modulo, subtraction, division and multiplication and display the result of computation. The screenshot of output is attached.

4 0
3 years ago
How many times is the coin tossed?
valina [46]

Answer:

100 times.

Explanation:

The code will loop until i is equal to or greater than roles. I starts at zero and increases by one after each toss.

3 0
2 years ago
Read 2 more answers
Other questions:
  • During the charging of a storage battery, what is the temperature that the electrolyte solution must never exceed?
    6·1 answer
  • Using MARS/MIPS
    10·1 answer
  • When keying, keep fingers curved and upright over the home keys.<br> False<br> True
    5·1 answer
  • What integer is represented by the following 8-bit twos complement representation: 1011 0000 ? (Enter your number in decimal, an
    6·1 answer
  • What is a feature of webmail
    13·1 answer
  • What is copy and paste?
    13·2 answers
  • Which of the following defines a network
    7·1 answer
  • The response from a Google Form can be seen in how many ways?
    10·1 answer
  • What are 3 software programs for mobile computing?
    10·1 answer
  • Ten output devices you know
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!