Answer:
#include <iostream>
using namespace std;
int main ()
{
int num;
cin>>num;
cout << num<< " " << 2 num << " " << numnum;
return 0;
}
Explanation:
See answer
Answer: False.
Explanation: Random.choice can choose between any 2 numbers.
Answer:
true
Explanation:
let me know if it's right
Answer:
The function written in C++
int str(string word)
{
int count = 1;
for(int i =0; i<word.length();i++)
{
if(word[i] == ' ')
{
count++;
}
}
return count;
}
Explanation:
This line defines the function
int str(string word)
{
This line initializes count to 1
int count = 1;
This line iterates through the input string
for(int i =0; i<word.length();i++)
{
This line checks for blank space
if(word[i] == ' ')
{
Variable count is incremented to indicate a word count
count++;
}
}
return count;
}
<em>See attachment for full program</em>
Answer:
expr.at(g) returns a string, not a char. They are not the same thing and that is what the compiler is complaining about.