Q-1: Write a program in Assembly language using MIPS instruction set that reads a sentence/string and prints the number
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Q-1: Write a program in Assembly language using MIPS instruction set that reads a sentence/string and prints the number
question Number of vowels in the string: 13 Number of A/a in the sentence =1 Number of E/e in the sentence = 4 Number of i/i in the sentence = 2 Number of O / o in the sentence = 5 Number of U/ u in the sentence = 1
Q-1: Write a program in Assembly language using MIPS instruction set that reads a sentence/string and prints the number of vowels in the sentence. The program should scan from the beginning to the end of the sentence and calculates the total numbers of vowels (a, e, i, o, u). Both uppercase and lowercase letters are treated equally. The program should also print the number of each vowel character in the sentence. Your sentence should contain at least one character and a maximum of 255 characters. Find below the ASCII values of all the vowel characters: Character ASCII Value Character ASCII Value А 65 97 E 69 e 101 ! 73 i 105 o 79 O 111 U 85 u 117 Sample Input/Output: Enter a string: A quick brown fox jumps over the lazy dog Number of vowels in the string: 11 Number of A/a in the sentence = 2 Number of E/e in the sentence = 2 Number of /i in the sentence = 1 Number of O / o in the sentence = 4 Number of U/ u in the sentence = 2 Sample Input/Output: Enter a string: To be, or not to be, that is the