Question 1 #include using namespace std; int main(){ string word = "Computer"; int x; while (1) { // some codes } return 0; } Question 2 #include using namespace std; int main(){ string sentence = "Sacred Heart Canossian College"; int x, y, i; while (1) { // input starting index with validation // input length of substring with validation (acceptable length depends on the starting index // output result by printing character by character } return 0; } Question 3 #include using namespace std; int main(){ string sentence; int count=0, i; // input sentence // count words // assume that each word is separated by one space // A fox kills a girl quickly but dies in the zoo afterwards. // ^^ ^^ ^^ ^^ // space followed by character = word // first word is an exceptional case! cout << "Number of words = " << count << endl; return 0; } Question 4(a), (b) and (c) #include using namespace std; int main(){ string sentence; int i; // enter a sentence // check character by character and convert if needed cout << sentence << endl; return 0; } Question 5 #include using namespace std; int main() { string s, z; char x[100], y[100], temp; int i, len; cout << "Plain text: "; getline(cin,s); len = _____ // use len to store the length of string s because you need this number frequently // ciphter text 1 stored in x for (i=0; i using namespace std; int main() { string email; char no[3]; int number; cout << "class: "; cin >> email; // input class to string email because it is the first thing in the email address cout << "number: "; cin >> number; // an integer // check if email[1] is capital letter or not, convert to lowercase letter if neccessary // create the string no by using the character array no[3] no[0] = (char) ________________; // tens digit no[1] = (char) ________________; // unit digit no[2] = ____________; email = __________________; // concatentate email, no, and the domain of the email address cout << "email address: " << email << endl; return 0; } Quesiton 7 #include using namespace std; int main() { string x, y, temp; // input x // input y // if x is after y alphabetically, swap x and y cout << "x: " << x << endl; cout << "y: " << y << endl; return 0; }