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
olchik [2.2K]
3 years ago
10

Assume that sentence is a variable of type String that has been assigned a value. Assume furthermore that this value is a String

consisting of words separated by single space characters with a period at the end. For example: "This is a possible value of sentence." Assume that there is another variable declared, firstWord, also of type String. Write the statements needed so that the first word of the value of sentence is assigned to firstWord. So, if the value of sentence were "Broccoli is delicious.", your code would assign the value "Broccoli" to firstWord.
Computers and Technology
1 answer:
disa [49]3 years ago
5 0

Answer:

//get the sentence from the user

          Console.WriteLine("Enter your sentence");

           //read the user information

           string ans = Console.ReadLine();

           //check if sentence ends with period

          if(!ans.EndsWith("."))

           {

               Console.WriteLine("Sentence should end with period");

               Environment.Exit(0);

           }

           //declear empty string firstword

           string firstWord = "";

           //split the requested sentence using single space character

          string[] splitans =  ans.Split(' ');

           //assign firstword

           firstWord = splitans[0];

           //print out firstword

          Console.WriteLine(firstWord);

Explanation:

The program uses c#.

You might be interested in
I need like 10 sentences to delineate and discuss societal issues related to computing . “Including the guiding principles of pr
beks73 [17]

Answer:

Kindly check Explanation

Explanation:

Advancement in technology spurred largely due to the advent of the computer and internet has resulted in a notable change in the behavior, lifestyle and engagement of many individuals. This include ; providing a faster and more convenient way of computing and completing tasks. Accelerating the global rate of technological development due to great computing capabilities. Educational enhancement and development through online education.

Computing also pose some societal issues which needs to addressed. This include :

Issues regarding privacy and identity theft are widespread. Addiction to games and other engaging content often pose distraction to youth and child development. Computing could be said to have placed increased pressure on human power and engagement with the advent of automated robots and programs. Increased exposure to electromagnetic rays. Promotion of indecency and immoral contents has become increasingly easier. Peer influence through fake promotion and display of wealth by some overrated individuals.

Therefore, it is imperative that informations conveyed through the internet are treated with utmost confidentiality in other to avoid privacy issues which may arise from leakage.

8 0
3 years ago
A server core installation can't be converted to a minimal server interface.
11Alexandr11 [23.1K]
True.... ca i have brainliest?
3 0
3 years ago
What command do you use to increase or decrease the view of a selected cell or range of cells to fill the excel window area for
kap26 [50]

Zoom to selection is the command that should be used to increase or decrease the view of a selected cell or range of cells to fill the excel window area for better visibility

I hope this will help you.

7 0
3 years ago
I need help figuring out 2 pictures with topics that I can put on a magazine about the serengeti. This is something I'm doing fo
Usimov [2.4K]

Answer:

how about lions, trees, or zebras

Explanation:

i looked it up

4 0
3 years ago
Read 2 more answers
Write an algorithm for a program which inputs the lengths a, b and c of the three
Dmitriy789 [7]

Hello,

Answer:

<h2>--//Triangles Algorithm</h2>

Declare the variables of the side of each triangle, in this case, a, b, and c, and input them.

If a^2 == b^2 + c^2

           display "This triangle IS right-angled."

Else

          display "This triangle is NOT right-angled

Explanation:

The meaning of the word "algorithm" in this situation would be the coding of the program that you are assigned to create. I'll use Python in this. Display, in this case, will mean "print"

6 0
3 years ago
Read 2 more answers
Other questions:
  • Variables defined inside a member function of a class have: Block scope. Class or block scope, depending on whether the binary s
    5·1 answer
  • Microsoft acknowledged that if you type a res:// url (a microsoft-devised type of url) which is longer than ____ characters in i
    9·1 answer
  • Based on the type of document you want to create, you must first select the page
    15·2 answers
  • Why does the phrase "compatibility mode” appear when opening a workbook?
    6·2 answers
  • This program will output a right triangle based on user specified height triangleHeight and symbol triangleChar. (1) The given p
    14·1 answer
  • after clicking the start button on your computer screen desktop what option would you then select to examine systems components
    6·1 answer
  • Please help me the program c++
    15·1 answer
  • Write a function to prompt the user to enter the information for one movie (title, release date, mpaa rating and number of stars
    8·1 answer
  • On the MarketingConsultants worksheet, in cells D10:H13, use a PMT function to calculate the end of the month payment amount. En
    15·1 answer
  • Who used the ICT in a report to UK government in 1997
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!