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
Technician A says that excessive end play causes rapid wear of the sealing rings and possibly the sealing ring groove. Technicia
DerKrebs [107]

Answer:

Technician A only

Explanation:

Rapid wear of the sealing ring and the seal ring groove are result of excessive end play

7 0
3 years ago
Component(s) that only allow(s) electrons to flow in one direction. Mark all that apply
Korolek [52]

Answer:

A,D, and E

Explanation:

6 0
3 years ago
The human eye, as well as the light-sensitive chemicals on color photographic film, respond differently to light sources with di
jeka57 [31]

Answer:

a) at T = 5800 k  

  band emission = 0.2261

at T = 2900 k

  band emission = 0.0442

b) daylight (d) = 0.50 μm

    Incandescent ( i ) =  1 μm

Explanation:

To Calculate the band emission fractions we will apply the Wien's displacement Law

The ban emission fraction in spectral range λ1 to λ2 at a blackbody temperature T can be expressed as

F ( λ1 - λ2, T ) = F( 0 ----> λ2,T) - F( 0 ----> λ1,T )

<em>Values are gotten from the table named: blackbody radiati</em>on functions

<u>a) Calculate the band emission fractions for the visible region</u>

at T = 5800 k  

  band emission = 0.2261

at T = 2900 k

  band emission = 0.0442

attached below is a detailed solution to the problem

<u>b)calculate wavelength corresponding to the maximum spectral intensity</u>

For daylight ( d ) = 2898 μm *k / 5800 k  = 0.50 μm

For Incandescent ( i ) = 2898 μm *k / 2900 k = 1 μm

3 0
3 years ago
The extruder head in a fused- deposition modeling setup has a diameter of 1.25 mm (0.05 in) and produces layers that are 0.25mm
Angelina_Jolie [31]

Answer:

The time taken will be "1 hour 51 min". The further explanation is given below.

Explanation:

The given values are:

Number of required layers:

= \frac{38}{0.25}

= 152 \ layers

Diameter (d):

= 1.25 mm

Velocity (v):

= 40 mm/s

Now,

The area of one layer will be:

= 38\times 38 \ mm^2

= 1444 \ mm^2

The area covered every \second will be:

= d\times v

= 1.25\times 40

= 50 \ mm^2

The time required to deposit one layer will be:

= \frac{1444}{50}

= 28.88 \ sec

The time required for one layer will be:

= 15 \ sec

∴ Total times required for one layer will be:

= 15+28.88

= 43.88 \ sec

So,

Number of layers = 152

Therefore,

Total time will be:

= 152\times 43.88

= 6669.76 \ sec

= 1 \ hour \ 51 \ min

6 0
4 years ago
Hydrostatic Force Calculations: The textbook presents different approaches to obtain the hydrostatic force. One approach is the
LiRa [457]

Answer:

Explanation:

Resultant force = pressure * Projection area.

For irregular shape => Force resolving method.

Horizontal component = centroidal pressure * projected area.

Vertical force = unit weight * volume of the water displaced

3 0
3 years ago
Other questions:
  • Which description defines the mechanical advantage of a simple lever?
    12·1 answer
  • Coefficients of friction always involve how many materials? a. 0 b. 1 c. 2 d. 3
    15·1 answer
  • A cubical picnic chest of length 0.5 m, constructed of sheet styrofoam of thickness 0.025 m, contains ice at 0\[Degree]C. The th
    11·1 answer
  • Five bolts are used in the connection between the axial member and the support. The ultimate shear strength of the bolts is 280
    9·1 answer
  • Assume that the water temperature is 10°C and the depth of the settling tank is 3.0 m (9.80 ft). Calculate the theoretical settl
    11·1 answer
  • N2 flows through an insulated horizontal tube at steady state. With an inlet temperature of 150°C and a velocity change from 2 m
    11·1 answer
  • Which of the following is the typical carbon concentration range for cast irons?
    10·1 answer
  • Who is the inventor that created the light bulb
    9·1 answer
  • Pls i need help with this
    6·1 answer
  • I want to solve the question
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!