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
givi [52]
3 years ago
13

Rint "Censored" if userInput contains the word "darn", else print userInput. End with newline.

Computers and Technology
1 answer:
Marta_Voda [28]3 years ago
7 0

If you're coding with C++ then the solution would be:

  if (userInput.find("darn") != -1) {

     cout << "Censored" << endl;

  }

  else{

     cout << userInput << endl;

  }

Keep in mind that this will reject any input with the word "darn" in the sentence. This will not filter the word darn if the capitalization is in different formats like "Darn, dArn, daRn, darN, DARN".

You might be interested in
If you use your computer primarily for telnet into a remote computer, will you have a large long distance telephone bill?
Nikolay [14]

If you use your computer primarily for telnet into a remote computer, a person will not have a large long distance telephone bill.

<h3>What is telnet used for?</h3>

Telnet is known to be a kind of a network protocol that is said to be used to virtually look into a computer and to give a two-way, working hand in hand and text-based communication channel that exist between two machines.

Note that, If you use your computer primarily for telnet into a remote computer, a person will not have a large long distance telephone bill because it does not apply in any way.

Learn more about telnet from

brainly.com/question/23640188

#SPJ1

4 0
2 years ago
c Write a program that simulates a magic square using 3 one dimensional parallel arrays of integer type. Each one the arrays cor
Komok [63]

Answer:

hope this helps and do consider giving a brainliest to the ans if it helped.

Explanation:

//program to check if the entered grid is magic square or not

/**c++ standard libraries

*/

#include<bits/stdc++.h>

using namespace std;

/**function to check whether the entered grid is magic square or not

*/

int isMagicSquare(int arr[3][3]){

  int i,j,sum=0,sum1=0,rsum,csum;

  for(i=0;i<3;i++){

      sum+=arr[i][i];

      sum1+=arr[i][2-i];

  }

  if(sum!=sum1){

      return 0;

  }

 

  for(i=0;i<3;i++){

      rsum=0;

      csum=0;

      for(j=0;j<3;j++){

          rsum+=arr[i][j];

          csum+=arr[j][i];

      }

      if(sum!=rsum){

          return 0;

      }

      if(sum!=csum){

          return 0;

      }

  }

  return 1;

}

/** main function to get user entries and

* call function

* and print output

*/

int main(){

  int i,j,arr[3][3]={0};

  for(i=0;i<3;i++){

      for(j=0;j<3;j++){

          cout<<"Enter the number for row "<<i<<" and column "<<j<<" : ";

          cin>>arr[i][j];

      }

  }

  int ret = isMagicSquare(arr);

  if(ret==1){

      cout<<"This is a Lo Shu magic square"<<endl;

  }

  else{

      cout<<"This is not a Lo Shu magic square"<<endl;

  }

  return 0;

}

7 0
2 years ago
The gradual wearing away or breaking down of rocks by abrasion is a type of __________________ weathering.
lesya [120]

Answer:

a.physical

Explanation:

3 0
3 years ago
An organized file title helps save time locating files, communicates professionalism, and lets us know the file is most likely N
Shkiper50 [21]

An organized file title helps save time locating files, communicates professionalism, and lets us know the file is most likely not a virus: True.

A file can be defined as a computer document or resource which avails an end user the ability to store (record) data as a single unit on the storage device of a computer system.

Generally, all files are identified and organized based on the following criteria:

  • Name (Title).
  • Format (Type).
  • Size.
  • Date.
  • Status.
  • Owner.
  • Permission.

Based on the aforementioned criteria, an organized file title would help to save time locating files, communicates professionalism, and lets us know the file is most likely not a virus because it must have been scanned with an antivirus utility.

Read more: brainly.com/question/23728214

6 0
2 years ago
HELP ME PLEASE PLEASE PLEASE!!!! IM BEGING YOU!!!!
lora16 [44]

Answer:

Photo metadata is a set of data describing and providing information about rights and administration of an image. It allows information to be transported with an image file, in a way that can be understood by other software and human users.

Explanation:

4 0
3 years ago
Other questions:
  • Automotive engine cylinder heads can be made of what?
    7·1 answer
  • Presentation software allows business professionals to _____.
    14·2 answers
  • Marty uses a customized database to sort parts and track inventory. The customized database is an example of _____.
    15·1 answer
  • What is a Better Computer?<br> A. Alien<br> B. Microsoft<br> C. Windows<br> D. Apple
    11·2 answers
  • Rewriting notes into complete sentences is unnecessary if you want to include the notes in your study guide. Truth or false?
    15·2 answers
  • Which of these would NOT be a valid Internet Control Message Protocol (ICMP) error message:
    6·1 answer
  • Does this mechanism increase or decrease speed? Why?
    9·1 answer
  • What kind of software would you recommend a company use if its employees are receiving e-mails that are potentially hazardous ?
    10·1 answer
  • Question 1:
    5·1 answer
  • What is the difference between the byte and short data types in Java?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!