subject

Problem Statement EIGER is a brand-new, made-up computer language. It's very exciting, and very simple! EIGER only allows the programmer to do two things: define a name for an integer, and compare two names. Write a metaprogram - a program which can simulate the EIGER language.
For this problem, you will write a complete program that takes its input from stdin and outputs the answer to stdout. Your input will be a program in EIGER, and the output is simply the outputs of the program.
Each line of input contains one command. A definition command has the form
define i x
where i is an integer in the range [-100, 100], and x is a string of up to 20 lowercase alphabet characters (a-z).
A comparison command has the form
eval x comp y
where x and z are strings of the same format as in definitions, and comp is one of <, >, or =.
For each definition, use the string as a label for the given integer but don't output anything. Redefinitions are allowed. For each comparison, state whether it is true or false, depending on the current definitions. If the result is not known, output 'undefined.
Constraints
. All programs will have between 1 and 100 lines of commands.
Examples
1. define -78 argon
eval argon> argon
Output:
false
2. define -62 x define -28 2
eval y > 2
Output:
undefined
3. define 46 purple
eval purple blue
eval purple -purple
define 3 orange define 77 yello
define-76 violet
define 42 violet
eval gray orange
define 16 yellow
eval yellow- gray
eval violet < purple
eval violet < yellow
Output:
undefined
true
undefined
undet ined
true
false
1 Winclude
2
3 using namespace std;
4
5 - int main() {
6 // fill in code here
7 }
8

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:20
The north and south regions had very diferent economies in the 1800s.
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Facial expressions and gestures are examples of messages.
Answers: 3
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
question
Computers and Technology, 24.06.2019 15:20
Local area networks use many of the same network technologies and the internet, only on a smaller scale. devices that access lans are equipped with a network interface that contains circuitry for wireless or wired connections. devices also have a physical address, in addition to the ip addresses acquired from a dhcp server. the most popular wired technology is . the most popular wireless technology is , which can be configured as a(n) or star topology. setting up a lan and configuring its router is fairly easy. the first step is to change the standard to one that is secure. next, create a(n) that uniquely identifies the network by name. it is also important to activate wireless to prevent wireless signals from being intercepted during transmission. a limited-access network can be created for visitors to use. by activating , the router will be able to assign ip addresses to each device that joins the network. to connect to a secure lan that is protected by encryption, an encryption , or password, is required. lans can be used to access data collected by iot devices and the networks that tie these devices together. technologies such as rfid, nfc, bluetooth smart, zigbee, and z-wave offer -power links, essential for battery-powered devices that can’t expend excess amounts of energy transmitting data.
Answers: 1
You know the right answer?
Problem Statement EIGER is a brand-new, made-up computer language. It's very exciting, and very si...
Questions
Questions on the website: 13722361