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
Gekata [30.6K]
2 years ago
11

Print "Censored' if userlnput contains the word "darn, else print userlnput. End with newline. Ex: If userinput is "That darn ca

t., then output is: Censored Ex: If userlnput is "Dang, that was scary!", then output is: Dang, that was scary! Note: If the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report Program end never reached. The system doesn't print the test case that caused the reported message. 1 import java.util.Scanner; 3 public class CensoredWords 4public static void main ( 1 test passed String args) Scanner scnr -new Scanner(System.in); String userInput; A tests passed userInput scnr.nextLine); 10 Your solution goes here 12 13 Run
Computers and Technology
1 answer:
sasho [114]2 years ago
6 0

Answer:

The code is given below in Java with appropriate comments

Explanation:

//Import the input.

import java.util.Scanner;

class CensoredWords

{

    //Define the main method.

    public static void main(String args[ ])

    {

         //Define the variables.

         String userInput="" ;          

         //Define the scanner object

         Scanner scobj = new Scanner(System.in);

          //Accept the userInput.

         System.out.print("Enter String: ");

         userInput=scobj.nextLine();

         //Check if the input contains darn.

         //Print censored.

         if(userInput.toUpperCase().indexOf("DARN") != -1)

         System.out.printf("Censored");

         //IF the input does not contains darn

         //Print userInput.

         else

System.out.printf(userInput)

         return;

}

}

You might be interested in
An excel file called “student_gpa” is opened. What does the funnel next to “GPA” indicate
Ivan

Answer is A. The data has been filtered

The funnel in Excel lets you know that there is a filter in place on the columns. It is a filter icon. By default, any filtered column in Excel gets a little funnel icon on the top row as shown in the image attached. Once this funnel symbols is clicked, it gives you options to filter using several criteria.

6 0
2 years ago
:)
Vilka [71]

Answer:

A, system software

Explanation:

that is answer an interpreter is a type of system software

5 0
2 years ago
Write a partial class that shows a class constant and an instance method. Write an instance method that converts feet to inches
MA_775_DIABLO [31]

Answer:

Please the code snippet below, the code was writen in Kotlin Language

Explanation:

const val inches:Int= 12 .   //This is the const value

fun main(args: Array<String>) {

 //this will ask the user for input

   print("Enter a number")            

  //this will do the conversion

var valueInFeet= Integer.valueOf(readLine())*inches

   print("The value in feet is $valueInFeet feet(s)")  

   }

4 0
2 years ago
........ manages the function of all the hardware and other software used in the computer.
Ivenika [448]

Answer:

The answer to this question is given below is in the explanation section.

Explanation:

manages the function of all the hardware and other software used in the computer:

operating system is defined as a system software that manages computer hardware and software resources and provide common services for computers programs.All application software computer programs requires an operation system to  function. operating system controls computer hardware run the computer programs and organize file.

CPU:

central processing unit that bring the instruction from memory to be executed and decodes.

Storing device:

Any hardware that can hold information temporarily and permanently. we distinguish two type of storage: as primary storage device and a secondary storage device.

Example:

  1. Magnetic storage device:hard drive,floppy diskette etc.
  2. optical: Blu-ray disc,CD Rom disc.

Flash memory device:memory card memory sick,ssd

Hardware:

Hardware include the physical features,which are every part that you can either see or touch, for example monitor,case,keyboard,mouse and printer.

Software:

The part which activate the physical components called software. it includes the features that resposible for directing the work to the hardware.

8 0
3 years ago
अस्स्मन्चचरे ------------------- दृश्यते |
Semmy [17]

Answer:

5?

Explanation:

4 0
3 years ago
Other questions:
  • How do I learn coding??? ​
    5·2 answers
  • A(n) ____ is a user interface that allows users to interact with graphical objects and pointing devices.
    13·1 answer
  • A powerful computer that acts as a hub for other computers is a called a ______.
    6·2 answers
  • Which term describes an event where a person who does not have the required clearance or access caveats comes into possession of
    15·2 answers
  • How has information technology made piracy possible
    14·1 answer
  • Write a program that takes in a positive integer as input, and outputs a string of 1's and 0's representing the integer in binar
    13·1 answer
  • Using complete sentences post a detailed response to the following.
    13·1 answer
  • Write a function solution that, given an array A consisting of N integers, returns the number of fragements of A whose sum equal
    9·1 answer
  • How do you hack a iPhone, Like If you forgot your password and want to get back in your phone. What do you do?
    7·2 answers
  • 100 POINTS!!!!!!!
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!