Question: convert the c code to mips int main() { string s; char ch; cout < < Enter a string: ; getline(cin, s); cout < <
convert the c code to mips
int main()
{
string s;
char ch;
cout << "Enter a string: "; getline(cin, s);
cout << "Enter a character: "; cin >> ch;
int count = 0;
for(int i = 0; i < s.length(); ++i)
{
if(s[i] == ch)
{
count++;
}
}
cout << "number of " << ch << " in " << s << " is " << count << endl; return 0; }
no psuedo instructions comments please
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
