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: i believe a digital citizen
i am not 100% sure about that answer but i reaserached a little and thats what i found :)
I hope this helps u out a little a thank and a brainlist would be greatly appreciatecd :)
<u>Answer</u>: B. Identify the source of the active connection
<em>Any problem can be fixed only finding of the source of it. We can fix a problem in ‘n’ number of ways but it might again come back if source of it is not identified.</em>
<u>Explanation:</u>
Identify the source of the active connection is the NEXT step the team should take. It is very similar to our human body.
If the infection is coming in the body again and again and gets fixed in the treatment, the reason for come - back will be identified so that it does not <em>lead to unnecessary treatment. </em>
In a similar way, if source are identified then the problem of come-back can be avoided. <em>So option B would be the right choice.</em>
import java.util.Scanner;
public class JavaApplication70 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Input a String:");
String txt = scan.nextLine();
System.out.println("Input an integer:");
int num = scan.nextInt();
String newTxt = "";
int w = 0;
for (int i = txt.length()-1; i >= 0; i--){
char c = txt.charAt(i);
while (w < num){
newTxt += c;
w++;
}
w = 0;
}
System.out.println(newTxt);
}
}
I hope this helps!