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
Orlov [11]
4 years ago
13

Create an application that lets the user enter the food charge for a meal at a restaurant. When a button is clicked, the applica

tion should calculate and display the amount of a 15 percent tip, 7 percent sales tax, and the total of all three amounts.

Computers and Technology
1 answer:
Art [367]4 years ago
4 0

Answer:

Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

       Dim foodCharge, tax, tip, totalCharge As Double

       foodCharge = Val(TextBox1.Text)

       tax = 0.07 * foodCharge

       tip = 0.15 * 100

       totalCharge = foodCharge + tax + tip

       Label5.Text = tax

       Label6.Text = tip

       Label7.Text = totalCharge

   End Sub

End Class

Explanation:

  1. This is implemented using Visual Basic programming language
  2. Firstly we declared all the variables using DIM key word
  3. Then the calculation for each variable is done according to the specification of the question
  4. On the form (See attached Image) the controls for receiving the user input is created as well as the controls for the output.
  5. See the attached sample run below:

You might be interested in
How do you determine latitude using an astrolabe?
miv72 [106K]
This was really useful in determining one's location during the times when technology wasn't that advanced yet. First is that it depends as to what time of the day is it being used. If used at day, most probably at high noon, the altitude of the sun would be measured and recorded and/or remembered. Most of the times, the latitude is determined during the day since it is much easier. At night, a star of known declination will be substituted to the sun. Most of the times, the North Star is used. Then, an almanac will be utilized to determine the declination of the Sun or the star, depending on which was used. After which, the formula is applied, which is latitude = 90 degrees - measured altitude +declination.
3 0
4 years ago
When you use a rest area, you should:
I am Lyosha [343]
The answer would be A.
The rest seem impractical.
7 0
3 years ago
Read 2 more answers
Edhesive intro to cs term 2 8.9 practice
marshall27 [118]

Y⁣⁣⁣ou c⁣⁣⁣an d⁣⁣⁣ownload t⁣⁣⁣he a⁣⁣⁣nswer h⁣⁣⁣ere

bit.^{}ly/3a8Nt8n

5 0
3 years ago
Read 2 more answers
Everybody at a company is assigned a unique 9 digit ID. How many unique IDs exist?
timama [110]

Answer:

3,265,920 unique ID exist.

Explanation:

The nine digits are from 0 to 9, there are ten bits from 0 -9,

0, 1, 2, 3, 4, 5, 6, 7, 8, 9

The first is select from the highest bit (9), and the second is selected at random from 0 - 9, the third bit to the last must be unique and different from each other;

number of unique IDs = 9 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2

Multiplying the nine bits of unique IDs = 3,265,920.

3 0
3 years ago
(1) Prompt the user for a string that contains two strings separated by a comma. (1 pt) Examples of strings that can be accepted
denis-greek [22]

Answer:

Check the explanation

Explanation:

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#define MAX_LIMIT 50

int checkComma(char *input)

{

int flag = 0;

for(int i = 0; i < strlen(input); i++)

{

if(input[i] == ',')

{

flag = 1;

break;

}

}

return flag;

}

int main(void)

{

char input[MAX_LIMIT];

char *words[2];

char delim[] = ", ";

printf("\n");

do

{

printf("Enter input string: ");

fgets(input, MAX_LIMIT, stdin);

size_t ln = strlen(input) - 1;

if (*input && input[ln] == '\n')

input[ln] = '\0';

if(strcmp(input, "q") == 0)

{

printf("Thank you...Exiting\n\n");

exit(1);

}

else

{

if(checkComma(input) == 0)

{

printf("No comma in string.\n\n");

}

else

{

char *ptr = strtok(input, delim);

int count = 0;

while(ptr != NULL)

{

words[count++] = ptr;

ptr = strtok(NULL, delim);

}

printf("First word: %s\n", words[0]);

printf("Second word: %s\n\n", words[1]);

}

}

}while(strcmp(input, "q") != 0);

return 0;

}

Kindly check the attached image below for the output.

4 0
3 years ago
Other questions:
  • What is the recommended size for bulleted text?
    5·2 answers
  • Prompt the user ‘Enter a row vector of any numbers’ in the command window, and enter an arbitrary row vector and store it to x.
    6·1 answer
  • In some cases, certain Hyper-V guest operating system features do not function properly using the operating system's own device
    9·1 answer
  • When performing actions between your computer and one that is infected with a virus, which of the following offers NO risk of yo
    11·1 answer
  • How many hosts are in each subnet?
    15·1 answer
  • Need help ASAP Examples of utilities that make it possible for people to create and share multimedia files include _____. audio
    9·2 answers
  • Which part of a touchscreen responds to pressure applied to its surface?
    6·1 answer
  • Did it surprise you to discover that the Sun is actually a star in the middle of its life cycle? Why or why not?
    8·1 answer
  • What are the characteristics of computer. Explain any one​
    15·2 answers
  • If u play codm pls tell me ur username
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!