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
<span>B.network security means all personal information is kept safe the network is not compromised and only authorized users had access
Im pretty sure they ment has instead of had</span><span />
When permanent magnets of a motor are replaced with more powerful ones, the motor rotation will increase. This is because there is more electricity being generated.