Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

can someone help me programming each of the following questions in simple c/c++

ID: 3807818 • Letter: C

Question

can someone help me programming each of the following questions in simple c/c++ ( with an explanation, please)

Problem write a program that prompts the user to enter a word. Convert the word to Pig Latin by moving the first letter to the end of the word and adding "ay" to the end. For example, Tuesday becomes u Tay Repeat this process until the user types STOP. Problem 2 The a c program is executed, the main function is called with two arguments, argo and argv first, argc, is the number of arguments the program was called with. The second, start pointer to an array of strings that contain the arguments. This mechanism p a way to a program and pass it arguments directly from the command line. As an example, the following program prints whatever arguments are on the command line when the program is executed. include

Explanation / Answer

#include<iostream>

#include <string>

using namespace std;

string convertPiglatin(string); // This function will return a "piglatined" string

int main ()

{

  string inputstr,ch; // The unsorted word

  do{

  cout << "Enter a string to convert: ";

  cin >> inputstr;

  cout << endl << "The Piglatin version of string is " << convertPiglatin(inputstr)+" ";

  cout<<"Please enter 'STOP' to exit or any input to continue :";

  cin>>ch;

  }while(ch!="STOP");

  return 0;

}

string convertPiglatin(string _inputstr)

{

  int start = 0;  // The end and start a substring

  int end = _inputstr.size();

  string prePig;  // This is the string in which the substring will be stored

  prePig = _inputstr.substr(1, end); //Here I'm making the substring

  return prePig+_inputstr.at(0)+"ay";

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at drjack9650@gmail.com
Chat Now And Get Quote