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
Which option identifies the most likely scaling factor in the above drawing of the Mercury capsule and booster unit? 1:1,000 1:1
Elina [12.6K]

Answer:

I would say 10000;1 but thats just me

Explanation:

3 0
3 years ago
Meaning of construction
sammy [17]

Answer:

the action of building something, typically a large structure.

Explanation:

mark me brainliest

8 0
3 years ago
The stagnation chamber of a wind tunnel is connected to a high-pressure airbottle farm which is outside the laboratory building.
Natasha2012 [34]

This question is not complete, the complete question is;

The stagnation chamber of a wind tunnel is connected to a high-pressure air bottle farm which is outside the laboratory building. The two are connected by a long pipe of 4-in inside diameter. If the static pressure ratio between the bottle farm and the stagnation chamber is 10, and the bottle-farm static pressure is 100 atm, how long can the pipe be without choking? Assume adiabatic, subsonic, one-dimensional flow with a friction coefficient of 0.005

Answer:

the length of the pipe is 11583 in or 965.25 ft

Explanation:

Given the data in the question;

Static pressure ratio; p1/p2 = 10

friction coefficient f = 0.005

diameter of pipe, D =4 inch

first we obtain the value from FANN0 FLOW TABLE for pressure ratio of ( p1/p2 = 10 )so

4fL_{max} / D = 57.915

we substitute

(4×0.005×L_{max}) / 4  = 57.915

0.005L_{max} = 57.915

L_{max} = 57.915 / 0.005

L_{max}  = 11583 in

Therefore, the length of the pipe is 11583 in or 965.25 ft

6 0
3 years ago
The inlet for a high-bypass-ratio turbofan engine has an area A1 of 6.0 m 2 and is designed to have an inlet Mach number M~ of 0
Lelu [443]

Answer:

The additive drag at flight condition will be found by the following equation

Area = A1 = 6m2

Da = Additive drag

Cda = Additive drag coefficient

P = prassure at altitude of 12Km

Po = Prassure at sea level

 \gamma = Ratio of specific heat capacity

The formula of additive drag is given below

D = Cda q A

q = Dynamic prassure , A = cross sectional area

q =( \gamma/ 2) P0 M02

    D = Cda ( \gamma/2) po Mo2 A

Cda=0.32

 \gamma=1.4

M=0.8

p0= 101325pa

D = 0.32 (1.4/2)(101325pa)(0.6)2 6

D = 49025N

Explanation:

The additive drag at the flight conditions will be D= 49025N

8 0
3 years ago
Put the letters representing the four main
SashulF [63]
1. Downside
2. Wishbone
3. Unwise
4. Swindle
5. Wanders
6. Snowed
7. Answer
8 0
4 years ago
Other questions:
  • (a) Determine the dose (in mg/kg-day) for a bioaccumulative chemical with BCF = 103 that is found in water at a concentration of
    11·1 answer
  • In case the Rectilinear distance is considered, find the optimal coordinates (X,Y) of new facility. Q2) Show and label the exist
    7·1 answer
  • Describe the basic mechanism by which positive photolithography transfers a pattern, and comment on the chemical interactions of
    11·1 answer
  • The statement that is NOT true about the difference between laminar and turbulent boundary layers is:1.the Reynolds number for a
    8·1 answer
  • Determine the combined moment about O due to the weight of the mailbox and the cross member AB. The mailbox weighs 3.2 lb and th
    14·1 answer
  • You are using a Geiger counter to measure the activity of a radioactive substance over the course of several minutes. If the rea
    8·1 answer
  • The pilot of an airplane reads the altitude 6400 m and the absolute pressure 45 kPa when flying over the city. Calculate the loc
    10·1 answer
  • 10.0 kmol of a 40.0 mol% methanol and 60.0 mol% water mixture is processed in a normal batch distillation system with a still po
    9·1 answer
  • When using a Hammer I should always keep an eye on may fingers so as not to hit them.?
    14·2 answers
  • Harlin is designing a new car engine that does not create pollution. Which technological design factor is probably the most
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!