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
When you learned about the Highway Transportation system you learned about 6 different types of people as
Musya8 [376]

Answer: 3 different types of people using Highway Transportation system are :

1. Pedestrians - should be given priority while driving.

2. Cyclists - should be given enough space on road.

3. Motorcyclists- should be given enough space on road.

Explanation:

1. Pedestrians - Most of pedestrians use to walk on the footpath along side road that keeps them on a safe side. But there are places without footpath along side road, in that case they have to walk on the road itself. Here, we need to take care for them. We need to wait in case they are crossing road and also check for them while taking a turn.

2. Cyclists - They travel on road but are tough to figure out. They travel at a slower pace compared to cars. To avoid any accident with them, we are supposed to give them enough space which should be equivalent to a car's space.

3. Motorcyclists - They can pass by very closely and also come between lanes. Most of the things to be considered here are same as that of cyclists. Here also, we need to check for them carefully while taking a turn. Also, need to give them enough space.

4 0
3 years ago
Consider casting a concrete driveway 40 feet long, 12 feet wide and 6 in. thick. The proportions of the mix by weight are given
Akimi4 [234]

Answer:

Weight of cement = 10968 lb

Weight of sand = 18105.9 lb

Weight of gravel = 28203.55 lb

Weight of water = 5484 lb

Explanation:

Given:

Entrained air = 7.5%

Length, L = 40 ft

Width,w = 12 ft

thickness,b= 6 inch, convert to ft = 6/12 = 0.5 ft

Specific gravity of sand = 2.60

Specific gravity of gravel = 2.70

The volume will be:

40 * 12 * 0.5 = 240 ft³

We need to find the dry volume of concrete.

Dry volume = wet volume * 1.54 (concrete)

Dry volume will be = 240 * 1.54 = 360ft³

Due to the 7% entarained air content, the required volume will be:

V = 360 * (1 - 0.07)

V = 334.8 ft³

At a ratio of 1:2:3 for cement, sand, and gravel respectively, we have:

Total of ratio = 1+2+3 = 6

Their respective volume will be =

Volume of cement = \frac{1}{6}*334.8 = 55.8 ft^3

Volume of sand = \frac{2}{6}*334.8 = 111.6 ft^3

Volume of gravel = \frac{3}{6}*334.8 = 167.4 ft^3

To find the pounds needed the driveway, we have:

Weight = volume *specific gravity * density of water

Specific gravity of cement = 3.15

Weight of cement =

55.8 * 3.15 * 62.4 = 10968 pounds

Weight of sand =

111.6 * 2.60 * 62.4 = 18105.9 lb

Weight of gravel =

167.4 * 2.7 * 62.4 = 28203.55 lb

Given water to cement ratio of 0.50

Weight of water = 0.5 of weight of cement

= 1/2 * 10968 = 5484 lb

4 0
3 years ago
Why do we need an architect?explain briefly by focusing on its various sectors.
lara [203]

Answer:

An architect will help you determine exactly what you need and come up with inventive ideas to solve even the most complex design problems. Think of us as professional 3D problem solvers! An architect can and should lift your project out of the ordinary.

Explanation:

What are the 3 main functions of an architect?

Design: Architects must design, plan, and develop concepts to create construction plans and technical documents. These are based on client requirements and ideas. Research: Architects must learn about the different building codes, safety regulations, construction innovations and city laws that affect their designs

What are the 7 types of architecture?

There are several main types of architects who focus on different types of structures and designs.

...

Commercial Architects

Office buildings / skyscrapers.

Hotels.

Bridges.

Schools.

Museums.

Government buildings.

Multi-unit residential buildings.

Pretty much any type of building that's not a residential home.

8 0
2 years ago
During his military campaign in what is now Germany, Julius Caesar lead his army of 40,000 soldiers to the western bank of the R
CaHeK987 [17]

Answer:

identifying a problem

Explanation:

its right

5 0
3 years ago
6. What types of injuries can occur in an electronics lab and how can they be prevented?
marysya [2.9K]

Answer:

The most common injuries in a chemistry lab is making a fire, heat burns, chemical burns, cuts and scrapes, contamination, inhalation, and spills and breaks.

1.) You can prevent making a fire by making sure you close and seal flammable materials.

2.) You can prevent heat burns by teaching the students how to properly use tongs,water baths, and other cooling equipment. 

3.) You can prevent chemical burns by treating the chemicals with caution, measure carefully, and use the approved containers.

4.) You can prevent cuts and scrapes by telling the students how to use the blades safely, and also when they are disposing broken or sharp items they should know how to wrap them up so no one else will get hurt. 

5.) You can prevent contamination by washing your hands, protect their clothing and skin with a lab coat or a lab apron, gloves and glasses, and cleaning your area where the germs of the chemicals were so no one will become.

6.) You can prevent inhalation by opening up windows, using ventilation fans, and using an equipment that measures the amount of gas emission in a room.

7.) Finally, you can prevent spills and breaks by telling the students what will happen if anything spills, and tell them to clean up.  

8 0
3 years ago
Other questions:
  • Consider a fully-clamped circular diaphragm poly-Si with a radius of 250 μm and a thickness of 4 μm. Assume that Young’s modulus
    14·1 answer
  • Heat in the amount of 100 kJ is transferred directly from a hot reservoir at 1200 K to a cold reservoir at 600 K. Calculate the
    15·1 answer
  • Liquid water enters an adiabatic piping system at 15°C at a rate of 8kg/s. If the water temperature rises by 0.2°C during flow d
    12·1 answer
  • An orchestra is having a recording done of 2 performances in the same concert hall. The first show is sold out. They struggled t
    7·1 answer
  • Which technical planning document defines support tasks?
    7·1 answer
  • Different between an architect and an engineer​
    15·1 answer
  • Which option identifies the requirement standard NOT met in the following scenario?
    13·1 answer
  • Someone please please help me and explain!! I will give brainliest if right!!!
    9·2 answers
  • For some metal alloy, a true stress of 345 MPa (50040 psi) produces a plastic true strain of 0.02. How much will a specimen of t
    13·1 answer
  • Additional scals apply to the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!