SlideShare uma empresa Scribd logo
1 de 1
Baixar para ler offline
WRITE THE PROGRAM IN MIPS LANGUAGE ONLY THAT WORKS WITH MARS
SIMULATOR
(DONT COPY & PASTE FROM CHATGPT IT GIVES ANSWER WITH ERROR I HAVE
TRIED IT 100 TIMES BY NOW IT DOESNT SOLVE PROBLEM)
(I WROTE THAT IN BOLD BECAUSE PREVIOUS 2 EXPERT WHO ANSWERED COPIED
FROM CHATGPT)
A palindrome is a word or phrase that reads the same from left to right as right to left. A simple
palindrome is kayak, for example. Other rules are that you ignore punctuation and letter case.
For example, Madam, Im Adam is a palindrome despite commas, spaces, and upper and lower
case differences. Palindromes can also contain digits, such as 12421.
Write a program in MIPS language that works in MARS Simulator that does the following
1. Request a string from the user. If it is zero length (the first character is n) exit the program.
2. Determine if the string is a palindrome. If so, print Palindrome. If not, print Not a
palindrome.
3. Return to request another string.
Program structure:
1) You can assume no input string is longer than 200 characters.
2) You must write a function that determines whether the string is a palindrome. Call this with
the address of the string in $a0. This function must be recursive. That is, it must test whether
the initial string might be a palindrome and return true if it the outer two characters match and
false if they dont, meaning if you return false at any level, stop the recursive calls and return
false.
3) Within this function, you must call another function that removes anything that isnt a letter
or a number.
4) Within the second function, call a third function that converts lower case to upper case so
your comparisons work properly.
5) Finally, call your recursive palindrome function.
6) You should have two files. The first has the main body of your code that requests a string,
calls a function that checks a palindrome, which is item 2, above plus initialization code. The
second file has any subroutines you may need, such as removing punctuation and converting
case.

Mais conteúdo relacionado

Semelhante a WRITE THE PROGRAM IN MIPS LANGUAGE ONLY THAT WORKS WITH MARS SIMULAT.pdf

Scala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameScala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameAntony Stubbs
 
(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercisesNico Ludwig
 
How to make fewer errors at the stage of code writing. Part N1.
How to make fewer errors at the stage of code writing. Part N1.How to make fewer errors at the stage of code writing. Part N1.
How to make fewer errors at the stage of code writing. Part N1.PVS-Studio
 
How to make fewer errors at the stage of code writing. Part N1
How to make fewer errors at the stage of code writing. Part N1How to make fewer errors at the stage of code writing. Part N1
How to make fewer errors at the stage of code writing. Part N1Andrey Karpov
 
Task Perform addition subtraction division and multiplic.pdf
Task Perform addition subtraction division and multiplic.pdfTask Perform addition subtraction division and multiplic.pdf
Task Perform addition subtraction division and multiplic.pdfacsmadurai
 
What is the general format for a Try-Catch block Assume that amt l .docx
 What is the general format for a Try-Catch block  Assume that amt l .docx What is the general format for a Try-Catch block  Assume that amt l .docx
What is the general format for a Try-Catch block Assume that amt l .docxajoy21
 
C programming & data structure [character strings & string functions]
C programming & data structure   [character strings & string functions]C programming & data structure   [character strings & string functions]
C programming & data structure [character strings & string functions]MomenMostafa
 
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docx
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docxCOMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docx
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docxdonnajames55
 
Part I (1.5 points) Write a C++ program that reads a line from the key...
Part I (1.5 points)        Write a C++ program that reads a line from the key...Part I (1.5 points)        Write a C++ program that reads a line from the key...
Part I (1.5 points) Write a C++ program that reads a line from the key...hwbloom104
 
Questions4
Questions4Questions4
Questions4hccit
 
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxCMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxmary772
 

Semelhante a WRITE THE PROGRAM IN MIPS LANGUAGE ONLY THAT WORKS WITH MARS SIMULAT.pdf (15)

Scala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameScala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love Game
 
(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises(4) cpp automatic arrays_pointers_c-strings_exercises
(4) cpp automatic arrays_pointers_c-strings_exercises
 
How to make fewer errors at the stage of code writing. Part N1.
How to make fewer errors at the stage of code writing. Part N1.How to make fewer errors at the stage of code writing. Part N1.
How to make fewer errors at the stage of code writing. Part N1.
 
How to make fewer errors at the stage of code writing. Part N1
How to make fewer errors at the stage of code writing. Part N1How to make fewer errors at the stage of code writing. Part N1
How to make fewer errors at the stage of code writing. Part N1
 
Task Perform addition subtraction division and multiplic.pdf
Task Perform addition subtraction division and multiplic.pdfTask Perform addition subtraction division and multiplic.pdf
Task Perform addition subtraction division and multiplic.pdf
 
Lecture No 13.ppt
Lecture No 13.pptLecture No 13.ppt
Lecture No 13.ppt
 
What is the general format for a Try-Catch block Assume that amt l .docx
 What is the general format for a Try-Catch block  Assume that amt l .docx What is the general format for a Try-Catch block  Assume that amt l .docx
What is the general format for a Try-Catch block Assume that amt l .docx
 
C programming & data structure [character strings & string functions]
C programming & data structure   [character strings & string functions]C programming & data structure   [character strings & string functions]
C programming & data structure [character strings & string functions]
 
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docx
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docxCOMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docx
COMP 2103X1 Assignment 2Due Thursday, January 26 by 700 PM.docx
 
Java programlist (1)
Java programlist (1)Java programlist (1)
Java programlist (1)
 
Fortran 90 Basics
Fortran 90 BasicsFortran 90 Basics
Fortran 90 Basics
 
Part I (1.5 points) Write a C++ program that reads a line from the key...
Part I (1.5 points)        Write a C++ program that reads a line from the key...Part I (1.5 points)        Write a C++ program that reads a line from the key...
Part I (1.5 points) Write a C++ program that reads a line from the key...
 
Questions4
Questions4Questions4
Questions4
 
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docxCMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
CMPS 5P Assignment 3 Spring 19Instructions1. The aim o.docx
 
Php Learning show
Php Learning showPhp Learning show
Php Learning show
 

Mais de AMIOPTICPLUS

You are a doctor and come across a patient currently fighting an inf.pdf
You are a doctor and come across a patient currently fighting an inf.pdfYou are a doctor and come across a patient currently fighting an inf.pdf
You are a doctor and come across a patient currently fighting an inf.pdfAMIOPTICPLUS
 
You are a longtime auditor of Oval Tables Inc. In the last few days .pdf
You are a longtime auditor of Oval Tables Inc. In the last few days .pdfYou are a longtime auditor of Oval Tables Inc. In the last few days .pdf
You are a longtime auditor of Oval Tables Inc. In the last few days .pdfAMIOPTICPLUS
 
Yo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdf
Yo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdfYo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdf
Yo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdfAMIOPTICPLUS
 
Yep Company is considering investing in Project G or Project H. Proj.pdf
Yep Company is considering investing in Project G or Project H. Proj.pdfYep Company is considering investing in Project G or Project H. Proj.pdf
Yep Company is considering investing in Project G or Project H. Proj.pdfAMIOPTICPLUS
 
Yandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdf
Yandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdfYandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdf
Yandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdfAMIOPTICPLUS
 
Y=(1S)(YT)+I+G+a((EP)(P))m(YT).pdf
Y=(1S)(YT)+I+G+a((EP)(P))m(YT).pdfY=(1S)(YT)+I+G+a((EP)(P))m(YT).pdf
Y=(1S)(YT)+I+G+a((EP)(P))m(YT).pdfAMIOPTICPLUS
 
y is that corporations must create value for all of their stakeholders.pdf
y is that corporations must create value for all of their stakeholders.pdfy is that corporations must create value for all of their stakeholders.pdf
y is that corporations must create value for all of their stakeholders.pdfAMIOPTICPLUS
 
xx warlance stacdard dewotson.pdf
xx warlance stacdard dewotson.pdfxx warlance stacdard dewotson.pdf
xx warlance stacdard dewotson.pdfAMIOPTICPLUS
 
Xavier and Yolanda have original investments of $50,700 and $102,300.pdf
Xavier and Yolanda have original investments of $50,700 and $102,300.pdfXavier and Yolanda have original investments of $50,700 and $102,300.pdf
Xavier and Yolanda have original investments of $50,700 and $102,300.pdfAMIOPTICPLUS
 
X has the following probability distribution P(X) Compute the expect.pdf
X has the following probability distribution P(X)  Compute the expect.pdfX has the following probability distribution P(X)  Compute the expect.pdf
X has the following probability distribution P(X) Compute the expect.pdfAMIOPTICPLUS
 
Written descriptions of how to input data and how to invoke the func.pdf
Written descriptions of how to input data and how to invoke the func.pdfWritten descriptions of how to input data and how to invoke the func.pdf
Written descriptions of how to input data and how to invoke the func.pdfAMIOPTICPLUS
 
You get a bunch of photos with certain information about them. With .pdf
You get a bunch of photos with certain information about them. With .pdfYou get a bunch of photos with certain information about them. With .pdf
You get a bunch of photos with certain information about them. With .pdfAMIOPTICPLUS
 
writing a paper about Migraine using these 3 articles Migraine A Hi.pdf
writing a paper about Migraine using these 3 articles Migraine A Hi.pdfwriting a paper about Migraine using these 3 articles Migraine A Hi.pdf
writing a paper about Migraine using these 3 articles Migraine A Hi.pdfAMIOPTICPLUS
 
You are working as a network engineer for an IT company called YorkI.pdf
You are working as a network engineer for an IT company called YorkI.pdfYou are working as a network engineer for an IT company called YorkI.pdf
You are working as a network engineer for an IT company called YorkI.pdfAMIOPTICPLUS
 
You are the PM on a software upgrade project. You find out from a se.pdf
You are the PM on a software upgrade project. You find out from a se.pdfYou are the PM on a software upgrade project. You find out from a se.pdf
You are the PM on a software upgrade project. You find out from a se.pdfAMIOPTICPLUS
 
you are opening Tim Hortons in Nigeria.complete the sections of the .pdf
you are opening Tim Hortons in Nigeria.complete the sections of the .pdfyou are opening Tim Hortons in Nigeria.complete the sections of the .pdf
you are opening Tim Hortons in Nigeria.complete the sections of the .pdfAMIOPTICPLUS
 
You are meeting your client, Henry, who is 70 years old. Henry took .pdf
You are meeting your client, Henry, who is 70 years old. Henry took .pdfYou are meeting your client, Henry, who is 70 years old. Henry took .pdf
You are meeting your client, Henry, who is 70 years old. Henry took .pdfAMIOPTICPLUS
 
You are Maria Herrera and have been recently promoted to the positio.pdf
You are Maria Herrera and have been recently promoted to the positio.pdfYou are Maria Herrera and have been recently promoted to the positio.pdf
You are Maria Herrera and have been recently promoted to the positio.pdfAMIOPTICPLUS
 

Mais de AMIOPTICPLUS (20)

You are a doctor and come across a patient currently fighting an inf.pdf
You are a doctor and come across a patient currently fighting an inf.pdfYou are a doctor and come across a patient currently fighting an inf.pdf
You are a doctor and come across a patient currently fighting an inf.pdf
 
You are a longtime auditor of Oval Tables Inc. In the last few days .pdf
You are a longtime auditor of Oval Tables Inc. In the last few days .pdfYou are a longtime auditor of Oval Tables Inc. In the last few days .pdf
You are a longtime auditor of Oval Tables Inc. In the last few days .pdf
 
Yo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdf
Yo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdfYo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdf
Yo (Rohit) me un� al proyecto CVS Caremark en TCS-Noida en noviembre.pdf
 
Yep Company is considering investing in Project G or Project H. Proj.pdf
Yep Company is considering investing in Project G or Project H. Proj.pdfYep Company is considering investing in Project G or Project H. Proj.pdf
Yep Company is considering investing in Project G or Project H. Proj.pdf
 
Yandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdf
Yandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdfYandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdf
Yandie Izzo gestiona una estrategia de crecimiento de dividendos par.pdf
 
Y=(1S)(YT)+I+G+a((EP)(P))m(YT).pdf
Y=(1S)(YT)+I+G+a((EP)(P))m(YT).pdfY=(1S)(YT)+I+G+a((EP)(P))m(YT).pdf
Y=(1S)(YT)+I+G+a((EP)(P))m(YT).pdf
 
y is that corporations must create value for all of their stakeholders.pdf
y is that corporations must create value for all of their stakeholders.pdfy is that corporations must create value for all of their stakeholders.pdf
y is that corporations must create value for all of their stakeholders.pdf
 
Y=$6,000+1.pdf
Y=$6,000+1.pdfY=$6,000+1.pdf
Y=$6,000+1.pdf
 
xx warlance stacdard dewotson.pdf
xx warlance stacdard dewotson.pdfxx warlance stacdard dewotson.pdf
xx warlance stacdard dewotson.pdf
 
Xavier and Yolanda have original investments of $50,700 and $102,300.pdf
Xavier and Yolanda have original investments of $50,700 and $102,300.pdfXavier and Yolanda have original investments of $50,700 and $102,300.pdf
Xavier and Yolanda have original investments of $50,700 and $102,300.pdf
 
x is 3.pdf
x is 3.pdfx is 3.pdf
x is 3.pdf
 
X has the following probability distribution P(X) Compute the expect.pdf
X has the following probability distribution P(X)  Compute the expect.pdfX has the following probability distribution P(X)  Compute the expect.pdf
X has the following probability distribution P(X) Compute the expect.pdf
 
Written descriptions of how to input data and how to invoke the func.pdf
Written descriptions of how to input data and how to invoke the func.pdfWritten descriptions of how to input data and how to invoke the func.pdf
Written descriptions of how to input data and how to invoke the func.pdf
 
You get a bunch of photos with certain information about them. With .pdf
You get a bunch of photos with certain information about them. With .pdfYou get a bunch of photos with certain information about them. With .pdf
You get a bunch of photos with certain information about them. With .pdf
 
writing a paper about Migraine using these 3 articles Migraine A Hi.pdf
writing a paper about Migraine using these 3 articles Migraine A Hi.pdfwriting a paper about Migraine using these 3 articles Migraine A Hi.pdf
writing a paper about Migraine using these 3 articles Migraine A Hi.pdf
 
You are working as a network engineer for an IT company called YorkI.pdf
You are working as a network engineer for an IT company called YorkI.pdfYou are working as a network engineer for an IT company called YorkI.pdf
You are working as a network engineer for an IT company called YorkI.pdf
 
You are the PM on a software upgrade project. You find out from a se.pdf
You are the PM on a software upgrade project. You find out from a se.pdfYou are the PM on a software upgrade project. You find out from a se.pdf
You are the PM on a software upgrade project. You find out from a se.pdf
 
you are opening Tim Hortons in Nigeria.complete the sections of the .pdf
you are opening Tim Hortons in Nigeria.complete the sections of the .pdfyou are opening Tim Hortons in Nigeria.complete the sections of the .pdf
you are opening Tim Hortons in Nigeria.complete the sections of the .pdf
 
You are meeting your client, Henry, who is 70 years old. Henry took .pdf
You are meeting your client, Henry, who is 70 years old. Henry took .pdfYou are meeting your client, Henry, who is 70 years old. Henry took .pdf
You are meeting your client, Henry, who is 70 years old. Henry took .pdf
 
You are Maria Herrera and have been recently promoted to the positio.pdf
You are Maria Herrera and have been recently promoted to the positio.pdfYou are Maria Herrera and have been recently promoted to the positio.pdf
You are Maria Herrera and have been recently promoted to the positio.pdf
 

Último

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Último (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

WRITE THE PROGRAM IN MIPS LANGUAGE ONLY THAT WORKS WITH MARS SIMULAT.pdf

  • 1. WRITE THE PROGRAM IN MIPS LANGUAGE ONLY THAT WORKS WITH MARS SIMULATOR (DONT COPY & PASTE FROM CHATGPT IT GIVES ANSWER WITH ERROR I HAVE TRIED IT 100 TIMES BY NOW IT DOESNT SOLVE PROBLEM) (I WROTE THAT IN BOLD BECAUSE PREVIOUS 2 EXPERT WHO ANSWERED COPIED FROM CHATGPT) A palindrome is a word or phrase that reads the same from left to right as right to left. A simple palindrome is kayak, for example. Other rules are that you ignore punctuation and letter case. For example, Madam, Im Adam is a palindrome despite commas, spaces, and upper and lower case differences. Palindromes can also contain digits, such as 12421. Write a program in MIPS language that works in MARS Simulator that does the following 1. Request a string from the user. If it is zero length (the first character is n) exit the program. 2. Determine if the string is a palindrome. If so, print Palindrome. If not, print Not a palindrome. 3. Return to request another string. Program structure: 1) You can assume no input string is longer than 200 characters. 2) You must write a function that determines whether the string is a palindrome. Call this with the address of the string in $a0. This function must be recursive. That is, it must test whether the initial string might be a palindrome and return true if it the outer two characters match and false if they dont, meaning if you return false at any level, stop the recursive calls and return false. 3) Within this function, you must call another function that removes anything that isnt a letter or a number. 4) Within the second function, call a third function that converts lower case to upper case so your comparisons work properly. 5) Finally, call your recursive palindrome function. 6) You should have two files. The first has the main body of your code that requests a string, calls a function that checks a palindrome, which is item 2, above plus initialization code. The second file has any subroutines you may need, such as removing punctuation and converting case.