Answer:
#include <iostream>
#include <cstring>
using namespace std;
void replacePeriod(char* phrase) {
int i = 0;
while(*(phrase + i) != '\0')
{
if(*(phrase + i) == '.')
*(phrase + i) = '!';
i++;
}
}
int main() {
const int STRING_SIZE = 50;
char sentence[STRING_SIZE];
strcpy(sentence, "Hello. I'm Miley. Nice to meet you.");
replacePeriod(sentence);
cout << "Updated sentence: " << endl;
cout << sentence << endl;
return 0;
}
Explanation:
- Create a function called replacePeriod that takes a pointer of type char as a parameter.
- Loop through the end of phrase, check if phrase has a period and then replace it with a sign of exclamation.
- Inside the main function, define the sentence and pass it as an argument to the replacePeriod function.
- Finally display the updated sentence.
Highlight the text , then on the home toolbar , look for a row of lines , when you hover over each it'll say what is what e.g. align left , or centre . you can also centre text by highlighting it and pressing crtl + e <span />
Answer:
The answer to this question is "Option a".
Explanation:
The description of the JavaScript code as follows:
- In the code, there is two variable defined that are "years and months". The years convert string value in number and calculate years and holds value in years variable and months variable calculate the moths and holds value in months variable.
- Then we use conditional statements in this statement we use two if blocks. In first if block we check that years variable value is equal to 0. if this condition is true. it will print months in the alert box.
- In second if block we check that if months variable value is equal to 0. if this condition is true. it will print years in the alert box.
- In else block, we use an alert box that prints years and months.
Answer:
<h2><em>F</em><em>o</em><em>r</em><em> </em><em>m</em><em>e</em><em> </em><em>y</em><em>e</em><em>s</em><em> </em><em>i</em><em> </em><em>g</em><em>u</em><em>e</em><em>s</em><em>s</em><em> </em><em>y</em><em>o</em><em>u</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>u</em><em>p</em><em>d</em><em>a</em><em>t</em><em>e</em><em> </em><em>a</em><em>n</em><em> </em><em>a</em><em>p</em><em>p</em><em> </em><em>s</em><em>t</em><em>o</em><em>r</em><em>e</em><em> </em><em>i</em><em>n</em><em> </em><em>a</em><em>n</em><em>y</em><em> </em><em>d</em><em>e</em><em>v</em><em>i</em><em>c</em><em>e</em></h2><h2><em>I</em><em>'</em><em>m</em><em> </em><em>n</em><em>o</em><em>t</em><em> </em><em>s</em><em>u</em><em>r</em><em>e</em></h2>
<h2><em>×_× mello ×_×</em></h2>