I added a decimal format to keep all decimals within the hundredths place. I also changed the calcTip method to void and the argument to a double. Void means the method doesn't return anything and changing bill to type double let's us pass numbers with decimals to the calcTip method. I hope this helps!
Inaccurate and misleading
Explanation:
This is easily solvable with a for loop. Something like:
(I assume c++)
#include <iostream>
#include <string>
int main() {
take_input: //tag
std::string input;
cin >> input; //take the input
int spaceCount = 0;
char checking;
for(unsigned int i = 0; i == input.length(); ++i) {
checking = spaceCount[i];
if(checking == ' ')
spaceCount++;
}
if(spaceCount >= 1 && input.length >= 5)
std::cout << "Your name is " + input;
else
goto take_input; // reasks for input if the conditions are not met
return 0;
};
**remove all spaces before using the code, the if statements are messed up
Do you go to BASIS?
Sorry I don't have an answer for you, but we have the same assignment in our AP Comp sci class.
Just wondering.
Answer:Have a good dayyyyy
Explanation: can i be brainliest pls pls