25. Write the strings if the value of m and n as stated below. Given examples of the first language. m-1, n1 m= 1, n=0 m-0, n1 m1, n=2 m= 2, n1 a) (a*b" | n2 0} b) (o"b | m, n2 0) c) (amb"cn m, n2 0) d) (a"bem | m, n2 0) e) (o"be"d" |m, n2 0) (amb"e" | m20) e) (a"b"c"d | m, n2 0) h) (obe" |m, n20) (a"b" | m, nz0) a'b' = ab a'b'= ab a'b' = oobb o'b'= ab f) )(a"b | m, n20) k) (ab"e | m, nz 0) (o"bc | m, n2 0)
Q: c++, Thank you Write a program that finds word differences between two sentences. The input begins…
A: Code is given below-
Q: • R7.17Consider the following code that repeats a C++ string three times. string a = "Hello";…
A: A C program for the given criteria is as follows, File name:”main.c” #include <stdio.h>…
Q: 3. Rewrite the following code segment using a multiple-selection statement in the following…
A: Required:
Q: 2. Consider the following 3 strings over the alphabet {a,b} : S 3 ааааа, T = abbb, R= bbbbb. Which…
A: Let's solve the question step by step: Given words S = aaaaa T = abbb R = bbbbb Option (a) There…
Q: c) Write a sentence describing the meaning of 1 - P( 0and 0 ). d) Determine P(0 and 0 and 0) and…
A: C) 1-P(0 and 0) =1- P(0)*P(0) as per the formula P(A and B) = P(A)*P(B) This determines that 1-P(0…
Q: Q2/ Write a program in the Fortran language to read 10 numbers and find the sum of the numbers that…
A: Program :- IN Fortran Language program sum INTEGER, DIMENSION(1:10) :: x INTEGER…
Q: Exercise 7. Let E= {a,b,c}. Write a regular expression which can generate the language that has odd…
A: Answer the above questions are as follows:
Q: 4. Given a string str = "Java Programming". Write a program to read input a valid index of the…
A: Given a string str = "Java Programming". Write a JAVA program to read input a valid index of the…
Q: 2. Write a JAVA program to input two strings from the user and find the minimum number of insertions…
A: Required:- 2. Write a JAVA program to input two strings from the user and find the minimum number of…
Q: 10. Consider the following procedures for string manipulation. Procedure Call Explanation concat…
A: The string manipulation concat() method returns a single string str1 as str1=str1+str2 ie. str1 is…
Q: 6. In the JAVA language, write a program to input three strings s1, s2, and, s3 from the user and…
A: In the JAVA language, write a program to input three strings s1, s2, and, s3 from the user and then…
Q: Write regular expressions of the following languages- The set of strings that start and end with…
A: Given: Write regular expressions of the following languages- The set of strings that start and…
Q: 10. Let D = (0 | 1 | 2 | 3 | 4 |... | 9), Z = (1 | 2 | 3 | 4 |... | 9), and L= (A | B | C |... | Z).…
A:
Q: QUESTION 1 Examine the following DFA: B 1 A D 0. Identify in the list below the string that this…
A: Given a DFA, to identify which of the given string is accepted.
Q: 21. Consider the following set of statements. If x>y goto L5 ... L5: goto L7 Identify the set of…
A: According to question, ================================== Given : if x>y then goto loop number…
Q: Q2\ Write C++ program to sorting the following set of numbers from left to right in descending (4,…
A: If we can write the sorting algorithm we can use the vector in c++
Q: Make a C# programming of: 1. Cody at World Cup by CodeChum Tomorrow is the closing ceremony for…
A: Include all the namespace that is required in the program. Use the Console class of the System…
Q: 4.16 LAB: Parsing dates java please: Complete main() to read dates from input, one date per line.…
A: import java.util.*;public class Main { public static int getMonthAsInt(String monthString) {…
Q: Explain with an example the situation where using read() is appropriate and also an example where…
A: A file is storage place where data is stored. Python has many functions to read the content in…
Q: Write a program that prompts the user to input a string (a string can be a word, a phrase and/or a…
A: 1. declare an array space to sore the string i am using 20 characters. 2. take input from user I am…
Q: In c++ , perform data sorting using quick sorting. ( Drop code in words , explain the code and drop…
A: Quicksort picks an element as a pivot, and then it partitions the given array around the picked…
Q: Write a recursive function that reads words from the standard input stream and displays them in…
A: Program code: //include the required packages #include <iostream> #include <string>…
Q: Write this program in C programming language. Also provide a screenshot that it is working. Here is…
A: The problem is based on the basics of sorting techniques in C programming language.
Q: Write BNF rules that matches only a string that is in the form of a capitalized title (as in a book…
A: Given: Write BNF rules that matches only a string that is in the form of a capitalized title (as in…
Q: 23. Consider the two regular expressions, L1 = a* + b* L2 = ab* + ba* + b*a + (a*b)* a) Find a…
A: The * takes value from 0 to infinity a) In L1, we can generate aa by put * = 2 in a* The same…
Q: What is the effect of the nested repetition structures? int region = 4; int r = 0; int state = 12;…
A: Please find the answer below :
Q: a) Give an example of a string that is neither in the language of R nor in S. b) Give an…
A: Given R = (0*10+)+1* Given S = (1*01+)* * means zero or more occurrence + means zero or more…
Q: 2- Write a C# program that read a string and split this string according to space char into an array…
A: A space ( ) separated list of items from a file and we want individual items in an array. Almost…
Q: Q1) write visual C# program to find the value of Y such that, C = POK, let the value of K=10011110 y…
A: using system; using system.Text; using system.Security.cryptography; namespace…
Q: . Refer to the statement below, #include void main() { clrscr(); char a = 'o', d= 'h'; char *p1,…
A: #include <stdio.h>void main() { clrscr(); char a = 'o', d = 'h'; char *p1, *p2; p1…
Q: Example 6-16 shows how to write a program to factor a polynomial of the form x² + bx + c, where b…
A: Note: Since no langauge is mentioned, therefore answering the given language in python. # Function…
Q: Write a program in C++ that converts kilometers per hour to miles per hour (by using static data…
A: Formula: If input is in km/hr convert it to miles/hr else input will be in miles/hr convert it to…
Q: 1. Initialize len to 0. 2. Set a variable to the beginning index of string s. 3. Repeat the…
A: Initialize len to 0. Set a variable to the beginning index of string s. Repeat the following step…
Q: a 90 92 93 91 a, b FIGURE 2.6 6. The dfa M in Jexercise2.6 accepts the string w = a. Modify M to…
A: Modified the given DFA M to DFA M'
Q: 1. Write a program in C to find the number of times a given word 'the' appears in the given string.…
A: A string is a sequence of characters terminated with a null character \0.
Q: Exercise 7. Let E={a,b,c}. Write a regular expression which can generate the language that has odd…
A: Introduction
Q: In multiplication, assume that leading zeroes are not allowed. Write a program in C++ to help Prima…
A: The answer is
Q: Output the information as a formatted histogram. Each name is right justified with a setw() value of…
A: Program:#include <iostream>#include <string>#include <iomanip> using namespace…
Q: Write a program that prompts the user to input a string (a string can be a word, a phrase and/or a…
A: Below is the code
Q: Refer to the statement below, #include void main() { int i; int…
A: Algorithm: for (initialExpression; testExpression; updateExpression){ // body of the…
Q: c structure
A: We need to write a C program for the given scenario.
Q: Write a program that takes a string and integer as input, and outputs a sentence using those items…
A: A C++ program for the given criteria is as follows, File name: “main.cpp” #include <iostream>…
Q: int i, n; // initialize first and second terms int t1 = 0, t2 = 1; // initialize the next term (3rd…
A: Converting following c program into MIPS instructions
Q: hter a program in C++ tó réád à šét a set ntegers, the last of which is 55, and calculate the number…
A: Solution :
Q: In multiplication, assume that leading zeroes are not allowed. Write a program in C++ to help Prima…
A: The answer is in below steps:
Q: In multiplication, assume that leading zeroes are not allowed. Write a program in C++ to help Prima…
A: Below is your c++ source code.
Q: Q1) Write a program in C + + language to find the result of executing the sequence of teration…
A: Program #include <iostream> using namespace std; int main(){ float S=0; int i=2; //…
i need J please
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
- PLEASE US SCHEME IN DRRACKET: In the language of an alien race, all words take the form of Blurbs. A Blurb is a Whoozit followed by between zero or more Whatzits. A Whoozit is the character 'x' followed by between one or more 'y's. A Whatzit is a 'q' followed by either a 'z' or a 'd', followed by a Whoozit.-The program should ask the user to “Enter an alien word:”, read the input as a string, and check whether or not it is a valid word (Blurb). If it is valid, it prints "The word is fine.", otherwise it prints "The word is a mess!". -The program should loop and ask the user for new input until they enter a valid blurb.The following two languages over {a,b} L1: All strings that contains at least two 'b's L2: All strings that has an 'a' as the second to last character of the stringConsider the following application. Identify and correct any syntactic errors or omissions by rewriting the line number and the corrected line. Note: There are 8 lines with errors. Each line may have multiple errors. Here’s an example (here, the error is on line 2, the correction is in bold – int x = 0;): 01 public static void main(String[] args){ 02 int x = '0'; 02 int x = 0; 03 int y + x = 7 03 int y = x + 7; 04 } 01 public Class Average; 02 { 03 public void main(String [] args) 04 { 05 double sc = (70, 75, 90, 83, 85, 97, 82, 79, 94, 87; 06 double me su = 0.0 07 for (int k = 0; k < sc.length(); k++); 08 su += sc[ ]; 09 double me = su/sc.length() 10 System.Out.printf("Output: %.2f" + me); 11 } 12 } What value of the variable me will be printed in line 10?
- Write a program in c++ that can find a given letter within a word of more than 10 characters, entered by the user. The program must indicate the successive position(s) of the character and display the character(s) found in capital letters.Example:Enter a word greater than 10 characters: extraordinarySearch letter: aResult: extrAordinAryThe letter a appears in positions 5 and 11.In C++, create a program which will read a phrase from the user and create a framed version of it for printing. For example, the phrase "hello world"would result in: ********* * hello * * world * ********* Whereas the phrase "the sky is falling"might be: *********** * the * * sky * * is * * falling * *********** Or: *********** * the * * sky * * is * * falling * *********** Or even: *********** * the * * sky * * is * * falling * *********** Depending on whether or not the user asked for left, centered, or right justification — respectively — of the phrase's words within the frame. Note how the frame exactly fits the phrase based on the longest word within. Neat, eh? The phrase "O | -+- | /-\"when centered would become: ******* * O * * | * * -+- * * | * * /-\ * ******* (Okay, so it's a sad excuse for a stick figure, but hey! I've never claimed to be a great good decent…Number system is base 10, because it strings together the digits 0 – 9 to form any whole number (there is a 1’s place, a 10’s place, a 10-squared’s place, etc). Hexadecimal numbers are written in base 16. This means they string together the digits 0 – 9 and the letters A – F to form any whole number (there is a 1’s place, a 16’s place, a 16-squared’s place, etc). For example, BD3C8 and 305A2 are two different 5-digit hexadecimal numbers. How many 9-digit hexadecimal numbers are there that have exactly 4 zeroes. (Note: Hexadecimal numbers, like our normal base 10 numbers, cannot start with a 0).
- In c++, Thank you Write a program that finds word differences between two sentences. The input begins with an integer indicating the number of words in each sentence. The next input line is the first sentence and the following input line is the second sentence. Assume that the two sentences have the same number of words and no more than 20 words each. The program displays word pairs that differ between the two sentences. One pair is displayed per line. Ex: If the input is: 6 Smaller cars get better gas mileage Tiny cars get great fuel economy then the output is: Smaller Tiny better great gas fuel mileage economy Add a function named ReadSentences to read the input sentences into two string vectors.void ReadSentences(vector<string>& sentence1Words, vector<string>& sentence2Words, int wordCount) main() already contains code to read the word count and call ReadSentences(). Complete main() to display differing word pairs.Write a function secondIndexOf, taking two strings and determining the second occurrence of the second string in the first string. If the search string does not occur twice, -1 should be returned. Example: secondIndexOf('White Rabbit', 'it') should return 10.In C++ write a program that prompts the user to enter three strings and then make a new string formed by concatenation of the three strings with space in between. Print the new string formed in output. Input- "Alpha", "Beta", "Gamma" Output- "Alpha Beta Gamma"
- IN C++ PLEASE Write a program that reads integers, finds the largest of them, and counts its occurrences. Assume that the input ends with number 0. Suppose that you entered 3 5 2 5 5 5 0; the program finds that the largest is 5 and the occurrence count for 5 is 4. Hint: Maintain two variables, max and count . max stores the current max number and count stores its occurrences. Initially, assign the first number to max and 1 to count . Compare each subsequent number with max . If the number is greater than max , assign it to to 1 . If the number is equal to max , increment count by 1 . Sample Run 1 Enter an integer (0: for end of input): 3 Enter an integer (0: for end of input): 5 Enter an integer (0: for end of input): 2 Enter an integer (0: for end of input): 5 Enter an integer (0: for end of input): 5 Enter an integer (0: for end of input): 5 Enter an integer (0: for end of input): 0 The largest number is 5 The occurrence count of the largest number is 4Q1. Write a program in C++ language to obtain the equation below, for values of x from (1 - 20), by using for statement: 2 % v=5 4 costx— VR4 = 4 Il Q2. Write a program in C++ language to sum the elements of array A, array A with 10 integer elements, entering its value from keyboard.Solve the problem in C++ (Anagrams) Write a function that checks whether two words are anagrams. Two words are anagrams if they contain the same letters in any order. For example, “silent” and “listen” are anagrams. The header of the function is as follows: bool isAnagram(const string& s1, const string& s2) Write a test program that prompts the user to enter two strings and checks whether they are anagrams. Sample Run 1 Enter a string s1: silent Enter a string s2: listen silent and listen are anagrams Sample Run 2 Enter a string s1: split Enter a string s2: lisp split and lisp are not anagrams