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
Dominik [7]
3 years ago
12

How to make a Tip Calculator in code?

Computers and Technology
1 answer:
ki77a [65]3 years ago
4 0
You should have the percentage of tip based on the service that you received.
Then you multiply the percentage of tip by the amount of money that you have to pay for what you bought.
You might be interested in
A lost update occurs when
shutvik [7]

Answer:

Option A is the correct answer.

Explanation:

7 0
3 years ago
Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo
dolphi86 [110]

Answer:

The function in C++ is as follows

int chkInd(string str1, string str2){    

int lenstr1=0;

while(str1[lenstr1] != '\0'){  lenstr1++;  }

int index = 0; int retIndex=0;

for(int i=lenstr1-1;i>=0; i--){

   while (str2[index] != '\0'){

       if (str1[i] == str2[index]){

           retIndex=1;

           break;         }

       else{   retIndex=0;      }

  index++;    }

  if (retIndex == 0){   return i;   }else{return -1;}}

}

Explanation:

This defines the function

int chkInd(string str1, string str2){    

First, the length of str1 is initialized to 0

int lenstr1=0;

The following loop then calculates the length of str1

while(str1[lenstr1] != '\0'){  lenstr1++;  }

This initializes the current index and the returned index to 0

int index = 0; int retIndex=0;

This iterates through str1

for(int i=lenstr1-1;i>=0; i--){

This loop is repeated while there are characters in str2

   while (str2[index] != '\0'){

If current element of str2 and str1 are the same

       if (str1[i] == str2[index]){

Set the returned index to 1

           retIndex=1;

Then exit the loop

           break;         }

If otherwise, set the returned index to 0

       else{   retIndex=0;      }

Increase index by 1

  index++;    }

This returns the calculated returned index; if no matching is found, it returns -1

  if (retIndex == 0){   return i;   }else{return -1;}}

}

4 0
3 years ago
Which technique records a signal with a video that uniquely identifies every frame of the tape using a time stamp in hours, minu
Nookie1986 [14]

Answer:

NTSC, Timecode

Explanation:

NTSC was used for television broadcasting in the USA, and some other countries. And it archives a video signal that exceptionally deciphers every frame of the tape with the assistance of the time stamp in unit time and frames. We have other options as well, which are PAL and SECAM. However, now and since 2013, these are being converted into the digital. The frame rate of the NTSC in the US was 29.97 fps. And this defines how good video you are going to receive.

And timecode is the signal that is recorded with the video that can quite exclusively figure out each frame of the tape with the help of the time stamp in unit time and frames.

3 0
3 years ago
Which tab is used to configure an export to PST in Outlook 2016?
Blizzard [7]

Answer:

file

Explanation:

you should go through the file so as to configure it

3 0
3 years ago
Read 2 more answers
Write a bash script HW4p2.sh to print out the list of numbers between 0 to 100 (including 0 and 100) that are divisible by both
ratelena [41]

Answer:

#!/bin/bash

function number_div( ) {

   for i in {0. .100};

   do

   if (( $i % 3 == 0 ))

   then

   echo $i

   elif (( $i % 5 == 0 ))

   then

   echo $i

   else

   echo "Number not divisible by 3 and 5"

   fi;

   done

}

number_div( )

Explanation:

The bash script is saved as "HW4p2.sh" and executed as "./HW4p2.sh". This code would print all and only numbers divisible by 3 or 5.

8 0
3 years ago
Other questions:
  • a circuit has an inductor with an inductive reactance of 230 ohms. this inductor is in series with a 500 ohm resistor. if the so
    5·1 answer
  • The ____ command will confirm the system directory that you are currently in
    13·1 answer
  • Describe the major research, discoveries, or impact Timothy Berners-Lee has made on the scientific community. 100 points for ans
    6·1 answer
  • All of the following are challenges presented by changing technology as it relates to the special events field EXCEPT: A. the ab
    13·1 answer
  • Which format is best for the image below?
    12·1 answer
  • During which part of geologic time did photosynthesis evolve?
    15·2 answers
  • ________ allows the computer to get its configuration information from the network instead of the network administrator providin
    5·1 answer
  • A news company is planning to use a Hardware Security Module (CloudHSM) in AWS for secure key storage of their web applications.
    14·1 answer
  • Which of these statements about PNG is true?
    11·2 answers
  • Pls say correct guyz pls pls pls
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!