Answer:
#include <string>
#include <iostream>
using namespace std;
int main() {
string userInput;
getline(cin, userInput);
// Here, an integer variable is declared to find that the user entered string consist of word darn or not
int isPresent = userInput.find("darn");
if (isPresent > 0){
cout << "Censored" << endl;
// Solution starts here
else
{
cout << userInput << endl;
}
// End of solution
return 0;
}
// End of Program
The proposed solution added an else statement to the code
This will enable the program to print the userInput if userInput doesn't contain the word darn
Answer:
Thks is true the int function changes a float value to an integer and will round up or down by default.
Alt and tab to switch to open applications
These refer to the elementary steps of the scientific method.
The correct order is as follows:
- Keen observation of natural phenomena.
- The use of imagination and creativity to test understanding and predictions.
- An attempt to verify the understanding of observed natural occurrences establishing verifiable scientific knowledge
- Continued observance and testing to revise scientific knowledge.
- An understanding of how or why these natural phenomena occur.
Learn more about the scientific methods at the link below:
brainly.com/question/497944