Using knowledge of computational language in C++ it is possible to write a function that "self contained underwater breathing apparatus"SCUBA". In this program generates and displays the acronyms for each of the strings in a data file named.
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
// Your program is required to have at least one user-define function.
// This function takes one string as input and returns the acronym corresponding to that string.
string getAcronym(string str){
string message = "";
if(str[0]>='a' && str[0]<='z')
message += str[0]-32;
else
message = str[0];
for(int i=1; i<str.length()-1; i++)
{
if(str[i-1]==' '){
if(str[i]>='a' && str[i]<='z')
message += str[i]-32;
else
message += str[i];
}
}
return message;
}
// Write a C++ program named acronym.cc
int main(){
// Your program generates and displays the acronyms for each of the strings in a data file named
See more about C++ at brainly.com/question/19705654
#SPJ1