Answer:
Double x = 35 / 10;
Explanation:
Java provides simple data types for representing integers, real numbers, characters, and Boolean types. These types are known as _ or fundamental types.
<3
Answer:
See Explanation
Explanation:
Given
See attachment 1 for proper table definition
To answer this question, one of the basic sql commands (the "create" command) will be used to create the required table, followed by the fields of the table.
<em>I could not submit my answer directly. So, I added two additional attachments which represent the answer section and the explanation section, respectively.</em>
This is normal as personal computers, unless designed to, don't usually put out a ton of power it's mostly just what your battery need and a bit more that's it
Answer:
<em>Given Data:</em>
<em>myBytes BYTE 10h, 20h, 30h, 40h </em>
<em>myWords WORD 3 DUP(?), 2000h </em>
<em>myString BYTE "ABCDE"</em>
<em />
Based on the data that we are given we can conclude that:
(a). a. EAX = 1
b. EAX = 4
c. EAX = 4
d. EAX = 2
e. EAX = 4
f. EAX = 8
g. EAX = 5
Answer:
Here is the Python program:
COOKIES_PER_BAG = 40 #sets constant value for bag of cookies
SERVINGS_PER_BAG = 10 #sets constant value for serving in bag
CALORIES_PER_SERVING = 300 #sets constant value servings per bag
cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user
print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed
Explanation:
The algorithm is:
- Start
- Declare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVING
- Set COOKIES_PER_BAG to 40
- Set SERVINGS_PER_BAG to 10
- Set CALORIES_PER_SERVING to 300
- Input cookies
- Calculate totalCalories: totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))
- Display totalCalories
I will explain the program with an example:
Lets say user enters 5 as cookies he or she ate so
cookies = 5
Now total calories are computed as:
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));
This becomes:
totalCalories = 5 * (300/40/10)
totalCalories = 5 * (300/4)
totalCalories = 5 * 75
totalCalories = 375
The screenshot of program along with its output is attached.