CONVER THIS C++ code Into MIPS USING MARS4__5 assembler #include #include #include void main() { clrscr(); char
Fantastic news! We've Found the answer you've been seeking!
Question:
CONVER THIS C++ code Into MIPS USING MARS4__5 assembler
Transcribed Image Text:
#include<iostream.h> #include<conio.h> #include<stdio.h> void main() { clrscr(); char str[100],str2[100]; int len,i,count=0; cout<<"Enter String: "; gets(str); cout<<"String at Start: "<<str<<endl; for(i=0;i<100;i++) { if(str[i]>96&&str[i]<123&&str[i]!='') { str2[i]=str[i]-32; } else if(str[i]=='') { count-count+1; str2[i]=''; } else str2[i]=str[i]; } cout<<"String after Conversion: " <<str2<<endl; cout<<"Word Count: "<<count<<endl; getch(); #include<iostream.h> #include<conio.h> #include<stdio.h> void main() { clrscr(); char str[100],str2[100]; int len,i,count=0; cout<<"Enter String: "; gets(str); cout<<"String at Start: "<<str<<endl; for(i=0;i<100;i++) { if(str[i]>96&&str[i]<123&&str[i]!='') { str2[i]=str[i]-32; } else if(str[i]=='') { count-count+1; str2[i]=''; } else str2[i]=str[i]; } cout<<"String after Conversion: " <<str2<<endl; cout<<"Word Count: "<<count<<endl; getch();
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
MIPS and MFLOPS were mentioned in this chapter as measures of the power of computer systems. If you were in charge of buying a new large computer system (and you might be someday), what measures of...
-
Please refer to example 5 of this chapter. Estimate the total transfer rate of solute A from the mass-transfer system shown in Figure 26.14, in units of gmole/h. As part of this analysis, consider...
-
Daw a flow chart for the MIPS assembly code .data ogstate: asciiz "UCF, its athletic program, and the university's alumni and sports fans are sometimes jointly referred to as the UCF Nation, and are...
-
1- The z-axis carries filamentary current of 10. A. Find Hat (-3,74,0) ? p= = = 2- The Y-axis carries filamentary current of 10 A. Find H at (-3,4,1) ? p= ,= = p= , = H p= 3- The X-axis carries...
-
About six years ago, one could buy debt that had been discharged in bankruptcy for less than five cents on the dollar. Why has the price increased to seven cents on the dollar? When a bankruptcy...
-
More copies of Time magazine are sold than are copies of Money magazine. Therefore, Time is a more profitable magazine than Money. Tell what possible misuses or misinterpretations may exist in the...
-
How to use social media for discovery
-
Super Clean, Inc. produces and sells stain remover. Information about the budget for the year 2012 is as follows: 1. The company expects to sell 50,000 bottles of stain remover in the first quarter,...
-
Manny Kant is invested one passive activity - Imperative, Inc. As of 1/1/2022 in which he had the following At-Risk Basis and Suspended Losses: At-Risk Basis $0 Suspended Losses under At-Risk Rules...
-
For several years, Herschel Anderson had operated Management Consulting Company as its sole proprietor. On January 1, 2016, he formed a partnership with Richard Harris to operate the company under...
-
In some cases, gaps are used to better align sequences. What do these gaps correspond to ?
-
Evaluate 3x2+8x+8, when x = 3.
-
Altira Corporation provides the following information related to its inventory during the month of August 2024: August 1 Inventory on hand-2,300 units; cost $6.40 each. August 8 Purchased 11,500...
-
Explain in 1000 words about the anthopological aspects of the movie, MODERN TIMES in the following format: The reason of choosing this movie for assignment - Key message of the movie - Social...
-
f(x) = x In(2x) Find f(x) for the function below....
-
Suppose that the weekly average expenditure of a student in your college is $150 with a variance of $81. (a) Suppose you draw a sample of 100 students. Compute the probability that the sample mean is...
-
Which of the following are included as part of the Data Link layer specifications? (Select two.) Cable and connector specifications Data transmission between hosts Digital data conversion Physical...
-
The figure shows a bolted lap joint that uses SAE grade 8 bolts. The members are made of cold-drawn AISI 1040 steel. Find the safe tensile shear load F that can be applied to this connection if the...
-
The CandyBar structure contains three members. The first member holds the brand name of a candy bar. The second member holds the weight (which may have a fractional part) of the candy bar, and the...
-
Why didnt the STL designers simply define a base iterator class, use inheritance to derive classes for the other iterator types, and express the algorithms in terms of those iterator classes?
-
Write a program that opens a text file, reads it character-by-character to the end of the file, and reports the number of characters in the file.
-
A spring-mass system has a natural period of \(0.21 \mathrm{~s}\). What will be the new period if the spring constant is (a) increased by \(50 \%\) and (b) decreased by \(50 \%\) ?
-
An industrial press is mounted on a rubber pad to isolate it from its foundation. If the rubber pad is compressed \(5 \mathrm{~mm}\) by the self weight of the press, find the natural frequency of the...
-
Three springs and a mass are attached to a rigid, weightless bar \(P Q\) as shown in Fig. 2.51. Find the natural frequency of vibration of the system. 0000 0000 k 12. 13 m + FIGURE 2.51 Rigid bar...
Study smarter with the SolutionInn App