Hi,
I changed your program using some of the concepts you were trying to use. Hopefully you can see how it works:
#include <string>
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
short T;
cin >> T;
cin.ignore();
string str[100];
for(int i=0; i<T; i++)
{
getline(cin, str[i]);
}
for (int i = 0; i < T; i++)
{
stringstream ss(str[i]);
string tmp;
vector<string> v;
while (ss >> tmp)
{
// Let's capitalize it before storing in the vector
if (!tmp.empty())
{
transform(begin(tmp), end(tmp), std::begin(tmp), ::tolower);
tmp[0] = toupper(tmp[0]);
}
v.push_back(tmp);
}
if (v.size() == 1)
{
cout << v[0] << endl;
}
else if (v.size() == 2)
{
cout << v[0][0] << ". " << v[1] << endl;
}
else
{
cout << v[0][0] << ". " << v[1][0] << ". " << v[2] << endl;
}
}
return 0;
}
Computer science certification, Linux professionalism, Java certification, Python certification
Answer:
Abstraction
Explanation:
Under fundamental principles of software engineering, the term "abstraction" is simply defined as the act of highlighting some details and hiding other ones.
Thus, the correct answer among the options is Abstraction.
Three. A bridge can be put under immense pressure during a storm. In addition to that if a tornado has caused a storm surge the rising water could make you drown
Answer:
Keywords are words or phrases that describe content. They can be used as metadata to describe images, text documents, database records, and Web pages. ... Keywords are used on the Web in two different ways: 1) as search terms for search engines, and 2) words that identify the content of the website.