1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aleks04 [339]
3 years ago
11

Create an unambiguous grammar which generates basic mathematical expressions (using numbers and the four operators +, -, *, /).

Without parentheses, parsing and mathematically evaluating expressions created by this string should give the result you'd get while following the order of operations. For now, you may abstract "number" as a single terminal, n. In the order of operations, * and / should be given precedence over + and -. Aside from that, evaluation should occur from left to right. So 8/4*2 would result in 4, not 1.
Computers and Technology
1 answer:
Anastasy [175]3 years ago
8 0

Answer:

Explanation:

Let G denote an unambiguous Grammar capable of producing simple mathematical expressions, involving operators +,-,*,/. These operators are left associative (which ensures left to right evaluation). S is the start symbol of the Grammar i.e. the production starts from S. n denotes a number and is a terminal i.e. we can't produce anything further from n. Then, the solution is as follows :

S → S + T |S - T | S

T→T | F | T*F|F

F → n

Here, S, T and F are variables. Note that /,* have been given precedence over +,-.

You might be interested in
doubleIt is a function that takes one argument and returns no value . The argument is a pointer to int . The function doubles th
Mama L [17]

Answer:

void doublelt(int *number)

{

*number=*number*2;

}

Explanation:

This exercise is for you to learn and understand the PASS BY POINTER syntax. The importance of this is that if you didnt use a pointer you would have to RETURN an int from the function. in that case the code would be:

int doublelt(int number)

{

number=number*2;

       return number;

}

Passing by pointer manipulates the value by going inside the memory and where it resides. Without the pointer, the function would create COPIES of the argument you pass and delete them once the function ends. And you would have to use the RETURNED value only.

8 0
3 years ago
For local travel addresses and street names should be
saul85 [17]
Capitalized  and properly spelled 

8 0
3 years ago
Which type of software-generated problems can indicate that a software bug is causing a memory error?
Katena32 [7]
The type of software-generated problems that can indicate that a software bug is causing a memory error are page fault, exception error and general-protection fault. Registry errors show that there are parts of the registry that were written to the faulty parts of the RAM. An erroneous memory count would happen when there is incompatibility in the installation.
3 0
3 years ago
You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
Rudiy27

Answer:

<em>A. check box </em>

Explanation:

A check box, selection box, or tick box <em>is a small immersive box that the user can switch to demonstrate an affirmative or negative choice</em>.

It is often observed in applications and operating systems ' HTML input forms, dialog boxes, and GUIs.

A check mark appears inside the box when clicked to signify an affirmative (yes) option. The check mark will vanish when clicking again, suggesting a negative option (no).

6 0
2 years ago
Compared to other forms of communication, texting does not offer as many message cues.
solmaris [256]
The correct answer is true.
3 0
2 years ago
Other questions:
  • As yall know its spoopy season. This means spoopy music! I am having a live stream on the Spoon app under the username teendrago
    11·1 answer
  • What is the windows server 2012 r2 feature that enables you to maintain previous versions of files on a server, so that if users
    10·1 answer
  • Helena purchased a security software package to protect her new laptop against threats such as spyware and computer viruses. she
    14·1 answer
  • What do you do to add a line or circle to your presentation?
    7·2 answers
  • Can you use public domain images without violating copyright laws?
    5·1 answer
  • Which of the following are examples of how a company might use consumer data it had collected? a To decide what types of product
    10·1 answer
  • Does access provide email communication
    13·1 answer
  • What integer is represented by the following 8-bit twos complement representation: 1011 0000 ? (Enter your number in decimal, an
    6·1 answer
  • How do the companies gather data to determine common passwords?
    13·1 answer
  • _______________ is a computer networking protocol used by hosts to retrieve IP address assignments.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!