Answer:
#include <iostream>
using namespace std;
int main()
{
char str[100][20];
int n;
cout<<"Strings you want to enter"<<endl;
cin>>n;
cout<<"enter n strings"<<endl;
for(int i=0;i<n;i++)
cin>>str[i];
for(int i=0;i<n;i++)
{
if((int)str[i][0]==98) //ascii value b is 98
cout<<str[i]<<endl;
}
return 0;
}
Explanation:
The above written code is for printing the strings which starts with the letter b.
To check if the string starts with a letter b we are checking the ascii value 98 which corresponds to b and then printing those strings.
I don't know if you want a poem about conduction but if so here ya go
no matter how the heat
different temperatures meet
hot to cold how it's done
Answer: are you tying to ask a question
Explanation:
Answer:
I believe the answer is beckoning.
Answer:
PROGRAMMING APPROACH:
- Define the necessary header file using namespace.
- Define the main() method.
- Declare variable inside the function().
- Print result.
Explanation:
Required C++ Code:
#include<iostream>
#include<string>
using namespace std;
int main()
{
string condStr;
int userVal;
cin>>userVal;
condStr=(userVal<0)?("negative"):("non-negative");
cout<<userVal<< " is "<< condStr <<"."<<endl;
}
OUTPUT:
-2
-2 is negative.