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.
Both A and B technicians are correct because both might be used to test fuses, according to technician B.
<h3>What is continuity?</h3>
The behavior of a function at a certain point or section is described by continuity. The limit can be used to determine continuity.
From the question:
We can conclude:
The technician claims that you may check for continuity using both an ohmmeter and a self-powered test light. Both might be used to test fuses, according to technician B.
Thus, both A and B technicians are correct because both might be used to test fuses, according to technician B.
Technician A says both an ohmmeter and a self-powered test light may be used to test for continuity. Technician B says both may be used to test fuses. Who is correct?
Learn more about the continuity here:
brainly.com/question/15025692
#SPJ1
Answer:
12ma²
Explanation:
The moment of inertia I = ∑mr² where m = mass and r = distance from shaft
Since we have three masses,
So, I = m₁r₁² + m₂r₂² + m₃r₃² where m₁ = first mass = m, m₂ = second mass = 3m and m₃ = third mass = 2m. Also, r₁ = distance of first mass from shaft = a, r₂ = distance of second mass from shaft = a and r₃ = distance of third mass from shaft = 2a.
I = m₁r₁² + m₂r₂² + m₃r₃²
I = ma² + 3ma² + 2m(2a)²
I = ma² + 3ma² + 2m(4a²)
I = ma² + 3ma² + 8ma²
I = 12ma²