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
vladimir2022 [97]
2 years ago
6

. Write a C++ Code to get a multiline statement Str1 from a user with a ‘$’ as return character (Hint:

Computers and Technology
1 answer:
Nuetrik [128]2 years ago
8 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   string s1, s2;

   cout << "Enter string s1: ";

   getline (cin, s1);

   s2 = s1;

   cout << "s1 = "<< s1 << endl;

   cout << "s2 = "<< s2;

   return 0;

}

Explanation:

You might be interested in
According to the video, what qualities do Human Services workers need? Check all that apply.
Helga [31]

Answer:

patience

understanding

ability to speak in public

willingness to take emotional risks

Explanation:

You are a human service worker, and hence you certainly need to provide the sufferers with the basic needs only. And for that, you do not need confidence or creativity. However, conditions can be challenging, and hence you certainly need the patience, ability to take emotional risks and understanding. Also, you should be good enough to speak in the public as that can be required sometimes. Hence, the correct options are as mentioned above.

5 0
3 years ago
Read 2 more answers
Create a function (prob3_6) that will do the following: Input a positive scalar integer x. If x is odd, multiply it by 3 and add
aniked [119]

Answer:

Following are the program in python language

def prob3_6(k): #function definition

  c = 0 #variable declaration

  while k != 1: #iterating the while loop

      print(k) #print k

      if k % 2 == 0:#check if condition  

          k= k // 2 #divisible by 2

      else: #else condition

          k = k * 3 + 1  

      c = c + 1

  print(k) #print k

  print c #print count

prob3_6(3)#function call

Output:

3

10

5

16

8

4

2

1

7

Explanation:

Following are the description of program

  • Create a function "prob3_6" in this function we passing an integer parameter of type "int" named "k".
  • Inside that function we declared a variable "c" of type "int" that is used for counting purpose .
  • After that we iterated the while for print the value of when it is not equal to 1 .
  • We check if condition when k gives 0 on modulus then k is divisible by 2 otherwise else block will be executed in the else part we multiply by 3 to k and add 1 to the k variable .
  • Finally print "k" and "c"

5 0
3 years ago
What is boot sector virus​
Galina-37 [17]

Answer:

Boot Sector virus is when a virus infects the Boot Sector of a hard disk. A Boot Sector is the initial files necessary to start an OS and other bootable programs. It is typically infected by these viruses when started with infected floppy disks, however the boot virus does not have to be successful to infect your computer. Once infected, the virus tries to infect every other disk.

Hope this helps!

4 0
1 year ago
What computer is designed for particular application​
Karo-lina-s [1.5K]

Answer: Applications for desktop or laptop computers are sometimes called desktop applications, while those for mobile devices are called mobile apps. When you open an application, it runs inside the operating system until you close it

Explanation:

5 0
2 years ago
Let G = (V, E) be an undirected graph. Design algorithms for the following (in each
Degger [83]

Answer:

i think its b if not sorry

Explanation:

3 0
2 years ago
Other questions:
  • How read binary file in c++
    7·1 answer
  • Purpose Your goal is to create a design for a software interface. You will experience the scope of the design process from brain
    7·1 answer
  • Micheal has increased the contrast of the given picture. Which feature or menu option of a word processing program did he use? A
    15·1 answer
  • What are attribute grammars used for?
    8·1 answer
  • Suppose there are two hosts, S and R. They are communicating over a TCP connection, and R has already received from S al bytes f
    11·1 answer
  • A finally clause will execute:
    8·1 answer
  • ANSWER ASAP!!!!!
    10·2 answers
  • What is the largest place value in a 12 bit binary number?
    10·1 answer
  • How do you get off of the comments after you look at them wit out going all the way off the app?
    15·1 answer
  • a user complains he cannot access a particular website, although he is able to access other websites. At which layer of the OSI
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!