Answer:
The function is as follows:
void readAndConvert(){
int n; string symbol,name;
cin>>n;
cin>>symbol;
cin.ignore();
getline (cin,name);
vector<string> trades;
string trade;
for (int inps = 0; inps < n; inps++){
getline (cin,trade);
trades.push_back(trade);}
cout<<name<<" ("<<symbol<<")"<<endl;
for (int itr = 0; itr < n; itr++){
string splittrade[3]; int k = 0;
for(int j=0;j<trades.at(itr).length();j++){
splittrade[k] += trades.at(itr)[j];
if(trades.at(itr)[j] == ' '){
k++; }}
cout<<splittrade[2]<<": "<<floor(stod(splittrade[1]) * stod(splittrade[0]))<<endl; }
}
Explanation:
See attachment for complete program where comments are used to explain each line
Answer: delete the application and install it again thats what worked for me.
Explanation:
Answer:
By using the str() function.
teeth = 32
print(str(teeth))
Explanation:
The str() function returns the string version of the given object.
Answer:
C. reduce his variable expenses.
Explanation:
There are two types of expenses: Variable expenses and Fixed Expenses. Fixed Expenses are the expenses that are fixed for every month and its difficult to reduce these expenses such as house rent, fuel or travel expenses to go for work, utility bills. These are almost fixed for every month and it is difficult to reduce them. On the other hand, variable expense are the expense that vary for every month and can reduce easily. These expenses includes eating outside at restaurants, clothing, enjoying and arranging parties.
Rahul should reduce his variable expense to reduce his spending. This could be the easier way to reduce the expenses and save more. First option is not valid as he want to reduce his spending, this shows that he is satisfied with his current job but worried about extra expenses each month. This is the reason option C is the better choice for him to reduce expense.
Answer:5. only A and B(precise control over the number of digits to be displayed and control over the presence of a leading zero)
Explanation: DECIMAL FORMAT CLASS is a subclass of Number format class specifically made to format parsing decimal Numbers. It is capable of formating both ARABIC, WESTERN AND INDIC DIGITS. It has a unique Attribute of control over the number of digits to be displayed and control over the presence of a leading zero.
NUMBER FORMAT CLASS is the class for formatting parsing numbers it helps to format According to Specific locale.