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
lana [24]
2 years ago
13

A. Get a value for x from the user.

Computers and Technology
1 answer:
Gennadij [26K]2 years ago
7 0

Program (Python):-

\tt x=int(input("Enter\:your\:number:"))

\tt if \:x

\tt \qquad print("You\:have\:made\: mistake")

\tt else:

\qquad\tt print("Well\:done")

\tt cuberoot=x**1/3

\tt print("Cube\:root=",cuberoot)

\tt for\:i\:in\:range(x):

\qquad\tt print(x)

Sample output

Enter your number:-8

You have made mistake

Cuberoot=-2

-8

-8

-8

-8

-8

-8

-8

-8

You might be interested in
In what year was the first permanent photographic image created?
kvv77 [185]

Answer:

1826

Explanation:

it was in 1826 when the first permanent photographic image was created.

5 0
2 years ago
Computer security experts devote their time and energy to the protection of sensitive data and the prevention of an outside atta
Alik [6]

Answer:

Information security policy are used for the prevention of intruders hacking a network when an organization start getting IT related attacks.

Explanation:

Information security policy are used for the prevention of intruders hacking a network when an organization start getting IT related attacks.

An information security policy are set of rules/policies designed to guide employees for the protection of the security of company information and IT systems. The reasons for these policies are:

  1. It defines what is required from organization’s employees for the security of the IT systems
  2. Information security policies provide a means to secure the organization against external and internal threats
  3. Information security policies are a mechanism to for ensuring an organization’s legal and ethical responsibilities
  4. Information security policies are created to hold each employee responsible with regard to information security
4 0
3 years ago
Digital citizenship is both a right and a {Blank}.
wolverine [178]
Privilege, I believe.
Hope this helps!<span />
6 0
3 years ago
Read 2 more answers
Define the four basic operation of a computer ​
Alexeev081 [22]

Answer:

input, output, processing, and storage.

Explanation:

input - the transfer of information into the system. ( ex: what you type on a keyboard. )

output -  the presentation of information to the user ( example is the screen. What type of display is presented...?)

processing - obtaining  information based on what you you searched ( What search results you get after putting in the input)

Storage - Storing or saving information into files.

6 0
3 years ago
Write a function named replaceSubstring. The function should accept three C-string arguments, let's call them string1, string2,
hoa [83]

Answer:

All is in explanation.

Explanation:

#include <iostream>

#include <cstring>

#include <string>

using namespace std;

//function prototype

string replaceSubstring(const char *, const char *, const char*);

string replaceSubstring(string, string, string);

int main()

{

//declare three char array to hold strings of max 100 chars

char string1[101];

char string2[101];

char string3[101];

//prompt user to enter input

//then read

cout << "Enter string to search:\n";

cin.getline(string1, 101);

cout << "Enter the string you want to replace:\n";

cin.getline(string2, 101);

cout << "What do you want to replace it with?\n";

cin.getline(string3, 101);

cout << "Your updated string is:\n";

cout << replaceSubstring(string1, string2, string3);

//return 0 to mark successful termination

return 0;

}

string replaceSubstring(const char *st1, const char *st2, const char *st3){

//declare pointers start and occurrence

//initialize start with string to search

//char *startSearch = st1;

//initialize occurrence with the first occurrence

//of st2 in st1

char *occurrence = strstr(st1, st2);

//declare empty string

string output = "";

//using occurrence as control for while loop

//means that it will iterate until no more

//occurrences are found

while(occurrence){

//append to final string the characters of st1

//up until first occurrence of st2

output.append(st1, (occurrence-st1));

//append st3 to final string

output.append(st3, strlen(st3));

//update occurrence to point to character

//of st1 just after first occurrence of st2

st1 = st1 + (occurrence-st1) + strlen(st2);

//find new occurrence

occurrence = strstr(st1, st2);

}

//st1 now points to first character after

//last occurrence of st2

output.append(st1, strlen(st1));

return output;

}

string replaceSubstring(string st1, string st2, string st3){

//convert input strings to C-strings

const char *ptr1 = st1.c_str();

const char *ptr2 = st2.c_str();

const char *ptr3 = st3.c_str();

//call function that accepts C-strings

replaceSubstring(ptr1, ptr2, ptr3);

}

6 0
3 years ago
Read 2 more answers
Other questions:
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
  • âwhat two log files are used by older versions of unix and newer version of linux to store log information
    10·2 answers
  • Which type of security threat installs to a computer without the user's knowledge and then monitors all computer activity?
    12·2 answers
  • Explain why professional software that is developed for a customer is not simply the programs that have been developed and deliv
    13·1 answer
  • How do you change the top and bottom margins of an entire document?
    7·2 answers
  • who will follow me on tiktok and like all my videos? if you do ill give branlist and give u a shoutout and you can enter my big
    15·1 answer
  • Which value can be entered to cause the following code segment to display the message "That number is acceptable."? ____.
    15·1 answer
  • What can happen if you do not follow the directions of medicine or the directions from the doctor? (Give 4 examples)​
    15·1 answer
  • Which area of government regulations do the Fair Credit and Reporting Act
    8·2 answers
  • You have an audio that contains one pause for 0.2 seconds and another one for 0.6 seconds. When do you need to create a new segm
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!