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
boyakko [2]
3 years ago
14

Implement the function lastChars() that takes a list of strings as a parameter and prints to the screen the last character of ea

ch string, one per line. If the list provided as a parameter is empty, the function prints a message to that effect. If any of the strings are empty, they are skipped in the display. The information below shows how you would call the function lastChars() and what it would display for a couple of parameters:
Engineering
1 answer:
Liono4ka [1.6K]3 years ago
8 0

Answer:

The following program is in C++.

#include <bits/stdc++.h>

using namespace std;

void lastChars(string s)

{

   int l=s.length();

   if(l!=0)

   {

       cout<<"The last character of the string is: "<<s[l-1];

   }

}

int main() {

   string s;//declaring a string..

   getline(cin,s);//taking input of the string..

   lastChars(s);//calling the function..

return 0;

}

Input:-

Alex is going home

Output:-

The last character of the string is: e

Explanation:

In the function lastChars() there is one argument that is a string.I have declared a integer variable l that stores the length of the string.If the length of the string is not 0.Then printing the last character of the string.In the main function I have called the function lastChars() with the string s that is prompted from the user.

You might be interested in
A steady stream (1000 kg/hr) of air flows through a compressor, entering at (300 K, 0.1 MPa) and leaving at (425 K, 1 MPa). The
AleksandrR [38]

Answer:

The work furnished by the compressor is 69.77kJ/s

The minimum work required for the state to change is 55.26kW

Explanation:

The explanation to these solution is on the first, second , third and fourth uploaded image respectively

8 0
3 years ago
Define the coefficient of determination and discuss the impact you would expect it to have on your engineering decision-making b
scoundrel [369]

Answer and Explanation:

The coefficient of determination also called "goodness of fit" or R-squared(R²) is used in statistical measurements to understand the relationship between two variables such that changes in one variable affects the other. The level of relationship or the degree to which one affects the other is measured by 0 to 1 whereby 0 means no relationship at all and 1 means one totally affects the other while figures in between such 0.40 would mean one variable affects 40% of the other variable.

In making a decision as an engineer while using the coefficient of determination, one would try to understand the relationship between variables under consideration and make decisions based on figures obtained from calculating coefficient of determination. In other words when there is a 0 coefficient then there is no relationship between variables and an engineer would make his decisions with this in mind and vice versa.

7 0
3 years ago
It is true about Metals and alloys: a)-They are good electrical and thermal conductors b)-They can be used as semi-conductors c)
ycow [4]

Answer:

(d) a and c are correct

Explanation:

METALS : Metal are those materials which has very high ductility, high modulus of elasticity, good thermal and electrical conductivity

for example : iron, gold ,silver, copper

ALLOYS: Alloys are those materials which are made up of combining of two or more than two metals these also have good thermal and electrical conductivity and me liable property

for example ; bronze and brass

so from above discussion it is clear that option (d) will be the correct option

8 0
3 years ago
Read 2 more answers
Design a plate and frame heat exchanger for the following problem:
qwelly [4]

Answer:

See explaination and attachment.

Explanation:

Iteration method is a repetitive method applied until the desired result is achieved.

Let the given equation be f(x) = 0 and the value of x to be determined. By using the Iteration method you can find the roots of the equation. To find the root of the equation first we have to write equation like below

x = pi(x)

Let x=x0 be an initial approximation of the required root α then the first approximation x1 is given by x1 = pi(x0).

Similarly for second, thrid and so on. approximation

x2 = pi(x1)

x3 = pi(x2)

x4 = pi(x3)

xn = pi(xn-1).

please go to attachment for the step by step solution.

8 0
3 years ago
What are the advantages of triggering circuit<br> for thyrestors?
sergejj [24]

Answer:

For most applications, it is simple, dependable, efficient, and straightforward to apply - a simple trigger signal may be provided, with appropriate processing if necessary. This implies that an appropriate trigger signal may be generated using other electrical circuits and then applied to the SCR.

Explanation:

3 0
3 years ago
Other questions:
  • A Michelson interferometer operating at a 500 nm wavelength has a 3.73-cm-long glass cell in one arm. To begin, the air is pumpe
    9·1 answer
  • Technician A says amperage cannot exist without both voltage and resistance. Technician B says if amperage is high, then you kno
    6·1 answer
  • What are 3 reasons why small businesses are an important part of the American economy?
    9·2 answers
  • An inductor (L = 400 mH), a capacitor (C = 4.43 µF), and a resistor (R = 500 Ω) are connected in series. A 44.0-Hz AC generator
    11·1 answer
  • Why is it a good idea to lock your doors while driving?<br> WRITER
    10·1 answer
  • The themes around which social sciences texts are organized boost understanding by
    11·1 answer
  • The term _______________refers to the science of using fluids to perform work.
    9·2 answers
  • 6
    10·2 answers
  • 5. A 15-nC point charge is at the origin in free space. Calculate V₁ if point P, is located at
    14·1 answer
  • Which of the given strategies is specifically a competitive advantage sustainment strategy?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!