What is wrong with each of the following?

shoNum + shoNum2 = shoTotal

shoNum = 10 * 4

Dim decPrice As Decimal = "$4.99"

shoCube = (shoSide)3

Answers

Answer 1

Answer:

The answer to this question is given below in the explanation section

Explanation:

shoNum + shoNum2 = shoTotal

in this code statement,  the order of operation is wrong because the calculation in programming always done at the right side of dependent variables.  so the correct statement of code is

shoTotal = shoNum + shoNum2;

shoNum = 10 * 4

This statement is programmatically correct, because the ShoNum value becomes 40 after performing the multiplication operation on its assigned value  (10 multiply by 4). However, it is noted that the empty space mostly ignored by the compiler. So, the correct is shoNum = 10*4;

Dim decPrice As Decimal = "$4.99"

The dollar sign is appeared in along with its value. So, if you assign value to a decimal variable, you need to assign only digit value (do not mix value with symbol or text) and also do not put quotation marks around value, if you put quotation marks around value then this value will be consider as a text value.

So, the correct statement is :

Dim decPrice As Decimal = 4.99;

shoCube= (shoSide)3

In this statement, cube is calculated of shoSide variable, mathematically it is right, but programmatically it is incorrect. Because, you missed the multiplication operation (*) between the operand shoSide and 3. it should

be as  shoSide raise to power 3.

the correct statement is : shoCube = (shoSide * shoSide *shoSide);


Related Questions

Look at the following Python code:

word1 = "Umpire"
word2 = word1[0:3]

Which characters will be sliced from word1 and assigned to word2?

Ump
Umpi
mpi
pire

Answers

Ump will be assigned to word2

word1[0:3] gets all of the letters from index 0 to index 3 exclusive (that means index 3 is not included)

1.5 code practice question 3

Answers

Answer: What the hell is that 243 suppose to be

Explanation:uhg

#include

#include

using namespace std;

const string face[] = { "Ace", "2", "3", "4", "5", "6", "7",

"8", "9", "10", "Jack", "Queen", "King" };

const string suit[] = { "Clubs", "Diamonds", "Hearts", "Spades" };

string random_card(bool verbose=false) {

string card;

card = face[ rand()%13 ];

card += " of ";

card += suit[ rand()%4 ];

if (verbose)

cout << card << "\n";

return card;

}

int main(int argc, char *argv[])

{

bool verbose = false;

int seedvalue = 0;

for (int i=1; i
string option = argv[i];

if (option.compare(0,6,"-seed=") == 0) {

seedvalue = atoi(&argv[i][6]);

} else if (option.compare("-verbose") == 0) {

verbose = true;

} else

cout << "option " << argv[i] << " ignored\n";

}

srand(seedvalue);

// declare a table called deck that keeps track of

// card faces dealt for each suit -- initialize to 0

while (1) {string card = random_card(verbose);

// reverse engineer card suit and face

// break out of loop if stopping criteria met

}

// print formatted table contents to stdout

}

write the non-existent Prog2b.cpp code and have it keep track of the order in which a card rank is observed for each suit. You do this by inserting the cards at the back of linked lists, using one list for each suit. The exception applies: each time a rank is seen again, the card gets moved to the front of the list. When the stopping criterion from Prog2a is encountered, break the infinite-loop and print the contents of each linked list to stdout as shown below.

Add an array of linked lists: the length of the array is fixed at 4 like before, while the length of each linked list varies from suit to suit. Each new card is added to the appropriate list thru use of an insert() function. Declare a list class based on a single linked list. The list class needs to define a private node datatype, and it must include a constructor for properly initializing an empty list, a destructor for deallocating all the nodes in a list as well as the list itself, and the mentioned insert function which works as described next; no other list class functions are needed. Overload operator<<() used by ostream and have it print the contents of the list. Since access is needed to private data members, make the overloaded output operator a friend of the list class. See the code handouts for how to set this up.

The list::insert() function is where the fun work takes place. The function takes a single integer argument, namely, the rank index of a card where index refers to the position of the rank in the global rank string array. If the rank index is not held by any node in the linked list, a new node is created and added to the end of the list that stores the rank index value. However, if a node is found to already hold the present rank index argument, that node is moved to the front the linked list. That is, the node in question is unlinked from where it is and inserted after the head node.

Hint: You are using a single linked list which means you cannot go back once you have a match on the rank index. One option is to look ahead instead of advancing and then taking a look a the rank index. Another option is to maintain two pointers, namely, one pointing to previous node and one pointing to current node.

Hint: Write generic code that works under all circumstances rather than have several codes for special cases. For example, write the insert() function so that it can handle a rank match regardless of where the matching node resides in the list. Draw a sketch of the different scenarios that need to be handled and infer from it how to do it generically.

Prog2b example output

UNIX> ./prog2b
Clubs : 10 6 Queen King 9 Jack **
Diamonds : Jack 9 6 Ace 3 8
Hearts : 9 3 King 7 Jack
Spades : Queen Ace Jack
UNIX>
UNIX> ./prog2b -seed=140
Clubs : 10 Jack King 4 2 Ace 7 6 3 8
Diamonds : King 3 Ace 9 Queen 5 10 8 7 2 Jack **
Hearts : Jack 2 10 7 6 3 Ace 5 4
Spades : 6 5 Jack 4 9 Queen 2

Answers

Answer:

dang sis did u really have to but all of that

Write a program that calculates the occupancy rate for ahotel. The program should start by asking the user how many floorsthe hotel has. A loop should then iterate once for each floor. Ineach iteration, , the loop should ask the user for the number ofrooms on the floor and how many of them are occupied. After all theiterations, the program should display how many rooms the hotelhas, how many of them are occupied, how many are unoccupied, andthe percentage of rooms that are occupied. The percentage may becalculated by dividing the number of rooms occupied by the numberof rooms.
Requirements:
Do not accept a value less than one for the number offloors
Do not accept a value less than 10 for the number ofrooms on the floor
In this hotel, the third floor is used for restaurants. Theloop in this program should skip the entire third iteration.
Use for loop and while loop in the program
Sample ouput
How many floors does the hotel have?
How many rooms are on floor 1?
How many of those rooms are occupied?
How many rooms are on floor 2?
How many of those rooms are occupied?
How many rooms are on floor 4?
How many of those rooms are occupied?
How many rooms are on floor 5?
How many of those rooms are occupied?
How many rooms are on floor 6?
How many of those rooms are occupied?
The hotel has a total of 65 rooms.
53 are occupied.
12 are unoccupied.
The occupancy rate is 81.5%

Answers

Answer:

Here is the C++ program:

#include <iostream>  //to use input output functions

using namespace std;   //to identify objects like cin cout

int main(){  //start of main function

       int MinFloors = 1;  //minimum number of floors

       int MinRooms  = 10; //minimum number of rooms

       int NoOfFloors;  //stores number of floors

       int NoOfRooms;  //stores number of rooms

       int OccupiedRooms;  //stores number of rooms occupied

       double TotalRooms=0, TotalOccupied=0;   //stores computed total number of rooms and total number of occupied rooms

       cout<<"How many floors does the hotel have? ";  //prompts user to enter number of floors

       do{  //iterates until the user enters valid number of floors

           cout<<"(cannot be less than "<<MinFloors<<"): ";  //error message

           cin >>NoOfFloors;  //reads number of floors from user

       }while(NoOfFloors<MinFloors);  //repeats as long as number of floors is less than minimum number of floors

       for(int floor=1; floor <= NoOfFloors; floor++){    //iterates through the floors to skip third iteration

           if(floor == 3){   //if floor is third floor

               continue;             }  

           cout<<"How many rooms are on floor " <<floor;  //prompts user to enter number of floors

           do{  //start of do while loop

               cout<<"(cannot be less than "<<MinRooms<<"): ";  //error message

               cin >>NoOfRooms;  //reads number of rooms from user

           }while(NoOfRooms<MinRooms);    //iterates as long as number of rooms are less than valid minimum number of rooms

           TotalRooms += NoOfRooms;   //adds number of rooms to the count of total number of rooms

           cout<<"How many of those rooms are occupied?";  //prompts user to enter number of rooms occupied

           do{  //start of do while loop

         cout<<"(cannot be less than 0 or greater than "<<NoOfRooms<<"): ";  //generates error message

         cin >>OccupiedRooms;  //reads number of rooms occupied by user

           }while(OccupiedRooms<0 || OccupiedRooms>NoOfRooms);   //iterates as long as the number of occupied rooms are less than 0 or greater than number of rooms

           TotalOccupied += OccupiedRooms;    }    //adds number of rooms occupied to the count of total number of occupied rooms    

       cout<<"\nThe hotel has a total of "<<TotalRooms<<" rooms"<<endl;  //displays the total number of rooms in the hotel

       cout<<TotalOccupied<<" are occupied."<<endl;  //displays the total number of occupied rooms

       cout<<(TotalRooms-TotalOccupied)<<" are unoccupied."<<endl;  //displays the total number of unoccupied rooms

cout<<"The occupancy rate is: "<<100*(TotalOccupied/TotalRooms)<<"%"<<endl;     }  //computes and displays the occupancy rate

   

Explanation:

The program first prompts the user to enter number of floors in the hotel. Lets say user enters 6. This is stored in NoOfFloors So

NoOfFloors = 6

So the loop runs for 6 times

Next it asks user to enter the number of rooms in the floor 1. Lets say user enters 12 so this is stored in NoOfRooms so

NoOfRooms = 12

TotalRooms += NoOfRooms;

this statement keeps adding number of rooms to TotalRooms so

TotalRooms = 12

Next program asks user about the number of occupied rooms. Lets say user enters 10 so this is stored in OccupiedRooms so

OccupiedRooms = 10

this statement keeps adding number of rooms to TotalOccupied so

 TotalOccupied += OccupiedRooms;

TotalOccupied = 10

At next iteration program asks user again to enter number of rooms in floor 2. Suppose user enters 14 so

NoOfRooms = 12

TotalRooms += NoOfRooms;

TotalRooms = 12+14

TotalRooms = 26

Program asks again to enter number of occupied rooms so it becomes:

OccupiedRooms = 8

this statement keeps adding number of rooms to TotalOccupied so

 TotalOccupied += OccupiedRooms;

TotalOccupied = 10+8

TotalOccupied = 18

Next is skips floor 3 and iteration 3. and asks user to enter number of rooms in floor 4. Suppose user enters 14

Number of rooms become:

TotalRooms = 12+14+14

TotalRooms = 40

and suppose user enters 14 as occupied rooms so total occupied become:

TotalOccupied = 10+8 + 14

TotalOccupied = 32

For floor 5: Suppose user enters 13

TotalRooms = 12+14+14+13

TotalRooms = 53

For floor 5: Suppose user enters 10

TotalOccupied = 10+8 + 14+10

TotalOccupied = 42

For floor 6: Suppose user enters 12

TotalRooms = 12+14+14+13+12

TotalRooms = 65

For floor 6: Suppose user enters 11

TotalOccupied = 10+8 + 14+10+11

TotalOccupied = 53

Now the loop breaks

Hence

TotalRooms = 65

TotalOccupied  = 53

total unoccupied = TotalRooms-TotalOccupied = 65-53 = 12

The occupancy rate is: 100*(TotalOccupied/TotalRooms) = 100*(53/65) = 81.5385

The output of the program is attached in a screenshot.

Select the correct navigational path to mark all teachers who have achieved “excellent” on their evaluations a red background. Select the rows or columns you wish to format. Click the (Home, Page layout, data, view) tab on the ribbon and look in the (Clipboard, alignment, number, conditional formatting) gallery. Select (New rule, manage rule, clear rule) . Select ( format only top or bottom, format all cells, use a formula) and fill in the formula for the IF statement and formatting. Click OK.

Answers

Answer:

View, Cond. Form., New rule, Format

Explanation:

:p Don't ask.

Answer:

Click the home tab

conditional formatting

select new rule

select "use a formula"

Explanation:

correct on edge 2020

Plz answer me will mark as brainliest​

Answers

Answer:

Processor is located on [tex]{\underline{\blue{\textrm{CPU}}}}[/tex]

The barcode is also called [tex]{\underline{\blue{\textrm{Universal Product code}}}}[/tex].

Which options are available in the Conditional Formatting dialog box? Check all that apply.

play a specified sound
create a calendar event
flag message for follow up
stop processing more rules
permanently delete a message
move a message to a specified folder

Answers

Answer:

Except the second one, all are correct.

Explanation:

On edg

A number is a palindrome if its reversal is the same as itself. Write a program reversenumber.java to do the following:
1. Define a method call reverse, which takes a 4-digit integer and returns an integer in reverse. For example, reverse(1234) should return 4321. (Hint: use / and % operator to separate the digits, not String functions)
2. In the main, take user input of a series of numbers, call reverse method each time and then determine if the number is a palindrome number, for example, 1221 is a palindrome number, but 1234 is not.
3. Enhance reverse method to work with any number, not just 4-digit number.

Answers

The given Java program takes a number as input from the user, reverses it, and checks if it is a palindrome. It uses the modulo and division operations to reverse the number. The program is not limited to 4-digit numbers and can handle numbers of any length.

```java

import java.util.Scanner;

public class ReverseNumber {

  // Method to reverse a given number

public static int reverse(int num) {

  int reversed = 0;

      // Reversing the number using modulo and division operations

  while (num != 0) {

    int digit = num % 10;

    reversed = reversed * 10 + digit;

    num /= 10;

  }

      return reversed;

}

  public static void main(String[] args) {

  Scanner scanner = new Scanner(System.in);

      // Taking user input

  System.out.print("Enter a number: ");

  int number = scanner.nextInt();

      // Reversing the number

  int reversedNumber = reverse(number);

      // Checking if the reversed number is equal to the original number

  if (number == reversedNumber) {

    System.out.println(number + " is a palindrome number.");

  } else {

    System.out.println(number + " is not a palindrome number.");

  }

      scanner.close();

}

}

```1. The `reverse` method takes an integer as input and reverses it using the modulo and division operations. It initializes `reversed` as 0 and in each iteration of the while loop, it separates the last digit of the input number using `num % 10`, appends it to `reversed` by multiplying it with 10, and then updates `num` by dividing it by 10.

This process is repeated until `num` becomes 0. Finally, the method returns the reversed number.

2. In the `main` method, we create a `Scanner` object to take user input. We prompt the user to enter a number, read it using `nextInt()`, and store it in the `number` variable.

We then call the `reverse` method to get the reversed number and store it in the `reversed Number` variable.

Finally, we compare `number` and `reversed Number` to check if the number is a palindrome or not. The result is printed accordingly.

3. The provided solution already works with any number, not just 4-digit numbers. This is because the `reverse` method separates the digits of the input number and reverses them regardless of the number of digits.

For more such questions palindrome,Click on

https://brainly.com/question/23161348

#SPJ8

What is a formula? What is a function? (In the context of Excel)

Answers

Answer: A formula is an expression which calculate the value of a cell .A funcation is a predefined formula that performs calculations using specific values in particular order.According to context of excel.

3.2 code practice question 1

Answers

Answer:

Not enough question content.

Explanation:

what word describes the complexity of document

Answers

Answer:

Explanation:

This study aimed to systematically identify and evaluate the readability and document complexity of currently available family history tools for the general public. Three steps were undertaken to identify family history tools for evaluation: (a) Internet searches, (b) expert consultation, and (c) literature searches. Tools identified were assessed...

I am writing a code that requires me to identify a positive integer as a prime (or not). I have looked at references on how to find it but it does not work for what I am trying to do. Below is the set of instructions. I have written the first half of the code and verified that it works. I am stuck on how to write the logic that identifies the prime based on the instructions.
-----
Write a program that prompts the user to input a positive integer. It should then output a message indicating whether the number is a prime number.
Your program should use a loop to validate the positive integer and accept the input only when the user inputs a positive number.
Your code should be an efficient algorithm using the following note.
(Note: An even number is prime if it is 2. An odd integer is prime if it is not divisible by any odd integer less than or equal to the square root of the number.)
For the square root, import the math library (import math) and use math.sqrt() function)

Answers

import math

number = int(input("Enter a number: "))

while number < 0:

 number = int(input("Enter a number: "))

if number % 2 == 0:

 if number == 2:

   print("Your number is a prime.")

   exit()

 print("Your number is not a prime.")

 exit()

elif number % 2 == 1:

 i = 2

 while i <= math.sqrt(number):

   if number % i == 0:

     print("Your number is not a prime ")

     exit()

   i += 1

print("Your number is a prime.")

I hope this helps!

1. A flowchart of this program. (Include the hand calculated expected output value. I pts)
2. Printout of your C++ program with a heading comment (with proper spacing and indentation)
3. Copy of a screenshot after your program is executed. (2 and 3: 2 pts cach)
4. Analyze the program and describe what makes the output to be different in plain English. ELEN 1381 Programming Assignment #4. Name Your name. Student ID : Your student ID #. Due date : Due date Purpose of the program : Calculate an average of four numbers. Section 1 : Enter four numbers. Section 2 : Calculate the average and display the answer. Section 3 : Calculate the average and display the answer. #include using namespace std; int main() int ni, n2, n3, n4, a; double b; // Section 1. cout << "Enter last digit of your Student ID : "; cin >> ni; cout << "Enter last digit of your Student ID +1: "; cin >> n2; cout << "Enter last digit of your Student ID + 2 : "; cin >> n3; cout << "Enter last digit of your Student ID + 4 : "; cin >> n4; // Section 2. a = (nl + n2 + n3 + 04) / 4; cout << "The average is : " < a << endl; 1/ Section 3. b = (nl + n2 + n3 + n4) / 4.0; cout << "The average is : " << b << endl; ; return ) // main

Answers

Answer:

See Explanation

Explanation:

1. See Attachment 1 (image file) for flowchart

2. & 3. See Attachment 2 for source file (Note that I've made some corrections on the source code)

4. What makes the outputs (a and b) to be different is that;

a calculates the average of the given parameters as a = (ni+n2+n3+n4)/4

While

b calculates a different expression = (ni+n2+n3+04)/4

They will only have the same output if n4 = 4

Need answer quick
In windows, the desktop is simply a folder that resides in your main user folder.
true or false?​

Answers

Answer:

true

Explanation:

Given a phrase stored in the variable phrase, write code to construct an acronym made up of the first letter of each word in the phrase. For example, the phrase 'Portable Network Graphics' would produce the acronym 'PNG'. Store the result in a variable named acronym, ensuring that it is composed of all uppercase letters. Assume that there is no whitespace on either end of the phrase and that one space character separates each word.
this is what I put but its wrong
phrase = input()
acronym = ""
lst = phrase.split()
for x in lst:
if (len(x) > 0):
acronym += x[0]
acronym=acronym.upper()
print(acronym)

Answers

Answer:

Your program is correct; it only lacks proper indentation

See Explanation

Explanation:

The only correction to your question is to rewrite using proper indents.

See below

phrase = input()

acronym = ""

lst = phrase.split()

for x in lst:

       if (len(x) > 0):

               acronym += x[0]

               acronym=acronym.upper()

print(acronym)

Note that:

You make use of indents when you have loop statements like (for) and conditional statements like (if)

A string s is a circular shift of a string t if it matches when the the characters are circularly shifted by any number of positions. For example, ACTGACG is a circular shift of TGACGAC, and vice versa. Detecting this condition is important in the study of genomic sequences. Write a program that checks whether two given strings s and t are circular shifts of one another.

Hint: The solution is a one-liner with indexOf() and string concatenation.

Answers

The solution
Nsmksmesmnwkwkwkkw

Daily requirements of 70 g of protein, 1 g calcium, 12 mg iron, and 3000 calories are needed for a balanced diet. The following foods are available for consumption with the cost and nutrients per 100 g as shown.
 
Protein
(g)
Calories
Calcium
(g)
Iron
Cost
GH¢
Brown Bread
12
246
0.1
3.2
0.5
Cheese
24.9
423
0.2
0.3
2
Butter
0.1
793
0.03
0
1
Baked Beans
6
93
0.05
2.3
0.25
Spinach
3
26
0.1
2
0.25
 
The objective is to find a balanced diet with minimum cost.
(a) Formulate a linear programming model for this problem.
(b) Use solver to find optimal solution and sensitivity report.         ​

Answers

Answer:

i think i know

Explanation:

Describe what should go into the blank space:
public class
A. a keyword
B. java syntax
C. a command
D. the name of the program

Answers

Answer:

d

Explanation:

Discuss how people navigated and communicated before the evolution of digital communication systems. What are the advantages of digital communication systems?

Answers

Answer:

Here are the examples!!! (Sorry if they are wrong)

.Meeting new people and not having to get sick from corona.

.Chatting with your friends online!.

Explanation:

That's all i could think of.

which of the following best describes information techonolgy (IT)?

Answers

Answer:

IT can be purchased; IS cannot be purchased

Explanation:

Yeah

PLEASE HELPP!!!!!
Select all that apply.
Proper numeric keyboarding technique includes:

1.looking at the keys
2.resting your fingers gently on the home keys
3.stiffening your fingers
4.keeping your wrist straight
5.pressing the keys squarely in the center

Answers

Answer:

1, 2 and 5

Explanation:

see picture to make sure they are in the correct order for you.

Answer:

resting your fingers gently on the home keys

keeping your wrist straight

pressing the keys squarely in the center

Variables used for input are associated with what controls on a form ?​

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

There are different forms control. for example HTML form controls are:

Text Input Controls. Checkboxes Controls. Radio Box Controls. Select Box Controls. File Select boxes. Hidden Controls. Clickable Buttons. Submit and Reset Button.

to take input from the user and store it into the variable, mostly text input form control is used.

however, you can also use text input, checkbox, radio button as a control to take input from the user and store the input value in some variables.

Trace the following pseudocode. List the values of COUNTER and ANSWER throughout and then show the final values.

a. Set COUNTER to 0.
b. Set ANSWER to 100.
c. Divide ANSWER by 2 and set ANSWER to the new result
d. If ANSWER is even, go back to step 3 and add 1 to COUNTER. If ANSWER is odd, go to the next line.
e. Repeat lines 6 and 7 until COUNTER is greater than 3
f. Increase ANSWER by the value of COUNTER.
g. Increase COUNTER by 1.
h. While COUNTER is greater than or equal to 2 do lines 9 and 10.
i. Decrease ANSWER by 5
j. Decrease COUNTER by 1
k. Display ANSWER and COUNTER

Answers

Answer:

ANSWER = 16

COUNTER = 1

Explanation:

a. COUNTER = 0

b. ANSWER = 100

c. ANSWER = 100/2 = 50

d. ANSWER (50) is even, so it goes back to (c)

ANSWER = 50/2 = 25

and

COUNTER = COUNTER + 1 = 0 + 1 =1

ANSWER is now odd (25), so it moves to (e)

e. f and g will be executed as follows.

f. ANSWER = ANSWER + COUNTER = 25 + 1 = 26

g. COUNTER = COUNTER+1 = 1 + 1 = 2.

COUNTER is not greater than 3, so f & g will be executed again

f. ANSWER = 26 + 2 = 28

g. COUNTER = 2 + 1 = 3.

And again

f. ANSWER = 28 + 3 = 31

g. COUNTER = 3 + 1 = 4

Now, execution will proceed to h

h. i and j will be executed as follows

i. ANSWER = ANSWER - 5 = 31 - 5 = 26

j. COUNTER = COUNTER - 1 = 4 - 1 = 3

COUNTER ≥ 2, so it'll be executed again

i. ANSWER = 26 - 5 = 21

j. COUNTER = 3 - 1 = 2

And again...

i. ANSWER = 21 - 5 = 16

j. COUNTER = 2 - 1 = 1

Now, the condition is no longer valid.

So, execution proceed to k

k. The displayed values of ANSWER and COUNTER is 16 and 1, respectively.

Plz answer me will mark as brainliest​

Answers

It is Performed by ALU

Write a program that will open the file random.txt and calculate and display the following: A. The number of numbers in the file. B. The sum of all the numbers in the file. C. The average of all the numbers in the file. You must determine how many numbers are in the file by searching for the end of the list of numbers. You are not allowed to hard code the expected number of numbers into your code. The file random.txt is located in the Lab 4 Canvas Module. Here is the result you should get: Number of numbers: 200 Sum of the numbers: 105527 Average of the numbers: 527.635

Answers

Answer:

Here is the C++ program:

#include <iostream>  //to use input output functions

#include <fstream>  //to manipulate files

using namespace std;  //to identify objects like cin cout

int main(){  //start of main function

  ifstream file;   //creates an object of ifstream

   file.open("random.txt"); //open method to open random.txt file using object file of ifstream

       

    int numCount = 0;  //to store the number of all numbers in the file          

    double sum = 0;   //to store the sum of all numbers in the file

    double average = 0.0;   //to store the average of all numbers in the file

    int number ; //stores numbers in a file

                 

        if(!file){   //if file could not be opened

           cout<<"Error opening file!\n";    }   //displays this error message

       

       while(file>>number){   //reads each number from the file till the end of the file and stores into number variable

           numCount++; //adds 1 to the count of numCount each time a number is read from the file          

           sum += number;  }  //adds all the numbers and stores the result in sum variable

           average = sum/numCount;  //divides the computed sum of all numbers by the number of numbers in the file

     

       cout<<"The number of numbers in the file: "<<numCount<<endl;  //displays the number of numbers

       cout<<"The sum of all the numbers in the file: "<<sum<<endl;  //displays the sum of all numbers

       cout<<"The average of all the numbers in the file: "<< average<<endl;  //displays the average of all numbers

       file.close();     }  //closes the file    

   

Explanation:

Since the random.txt is not given to check the working of the above program, random.txt is created and some numbers are added to it:

35

48

21

56

74

93

88

109

150

16

while(file>>number) statement reads each number and stores it into number variable.

At first iteration:

35 is read and stored to number

numCount++;  becomes

numCount = numCount + 1

numCount = 1      

sum += number; this becomes:

sum = sum + number

sum = 0 + 35

sum = 35

At second iteration:

48 is read and stored to number

numCount++;  becomes

numCount = 1+ 1

numCount = 2    

sum += number; this becomes:

sum = sum + number

sum = 35 + 48

sum = 83

So at each iteration a number is read from file, the numCount increments to 1 at each iteration and the number is added to the sum.

At last iteration:

16 is read and stored to number

numCount++;  becomes

numCount = 9 + 1

numCount = 10    

sum += number; this becomes:

sum = sum + number

sum = 674 + 16

sum = 690

Now the loop breaks and the program moves to the statement:

       average = sum/numCount;  this becomes:

       average = 690/10;

       average = 69

So the entire output of the program is:

The number of numbers in the file: 10                                                                                                           The sum of all the numbers in the file: 690                                                                                                     The average of all the numbers in the file: 69

The screenshot of the program and its output is attached.

What is the best location for the criteria range when filtering data?
A) immediately above the data you wish to sort
B) immediately below the data you wish to sort
C) immediately to the left of the data you wish to sort
X D) immediately to the right of the data you wish to sort

(It's NOT D)

Answers

Answer:

It's A

Explanation:

Anwser on E2020, just did it

Answer:

immediately above the data you wish to sort

Explanation:

Sami is creating a web page for her dog walking business. Which item will set the theme for her page?

a) Background color
b) Heading color
c) Link color
d) Text color

Answers

Answer:

A

Explanation:

Cam is creating a program to display the cost of groceries. The output will be a graph showing the change in prices over several months.
Which Python module should Cam use to draw a line on the screen?

Answers

Cam could use the Turtle module to draw a line on the screen.

I hope this helps!

Answer:

turtle graphics

Explanation:

turtle graphics is the only on ethatputs a line or shape on the screen using proccessof elimination.  

Java Eclipse homework. I need help coding this

Project 9B - Tuition

package: proj9B
class: Tuition

Write code using the if, else if and else statements that will take care of the following.

We are going to be writing code for a college to determine the cost of a students tuition. Use the following information for your program.

Collect and store the users First and Last Name.
Collect and store the users age and number of quarter credits.
Process the information and print an invoice showing the above information and include a projected tuition cost.
Program Parameters

Tuition for a course is free for people over the age of 65.
There is a fifty percent discount for those between the ages of 60 and 65.
Full-tuition cost is $250.00 per credit
Maximum credits is 18 per quarter.
(Note: Use appropriate (DecimalFormat) code to get the two zeros to print)

Example Printout:

Michael, Smith
Age: 62, Credits: 15
“You saved 50 percent on the cost of this course because you are between 60 and 65. Your cost is $1875.00.”

OR if age is >65: “Wow, are you lucky. Age is sometimes a real cool thing. This course is free for you!”

Make sure that it compiles and runs. When it does, save it according to your teacher’s directions.

Answers

I've included my code in a text file. I hope this helps!

In the Scrum board, prioritizing the issue backlog is done in the ———- mode.

Answers

Answer:

The answer to this question is given below in the explanation section

Explanation:

Scrum Board is a tool that is used by the scrum teams to view the product backlog. The Scrum task board makes the sprint backlog visible for the team.

In the Scrum board, prioritizing the issue backlog is done in the Current View mode.

However, it is noted that in Scrum board there are two view modes (Tree view mode and List view mode) for the issues in the backlog. The issues that are prioritized is listed in the current view mode.  

Other Questions
complete the 7 step process of recording transactions (instructions, pp. 11-12) for all purchases and cash disbursements on the transaction list Conduct a case study on a location of your choice and identify sources of air or water pollution. Discuss any environmental laws the pollutants or polluters are violating. You will have the option to discuss a relevant factor in your location, such as environmental injustice, epigenetics, or sustainable development. This will be due at the end of Unit 7. Instructions: Research, find, and describe a case of air or water pollution from a location of your choice from within or outside of the United States. Discuss the pollutants and how they would be in violation of any current pollution laws or legislation in the area. If here in the United States, how they would be in violation of the Clean Air or Clean Water Acts? Or perhaps the country you have researched has no restrictions on pollution for air and water, discuss how this would further endanger the lives of humans and wildlife in the area. Choose one (1) of the following special topics below and discuss how the source of pollution is contributing to it. Be sure to support your work with at least two (2) pieces of scientific evidence: o An Environmental Injustice o A threat to Epigenetics by potentially causing inheritable gene defects o Defies sustainable development (contributes to the degraded environment and causes harm to wildlife or the ecosystem) Requirements: Provide multiple pieces of supporting evidence in your claims, using at least two (2) scholarly resources. Include all references and citations formatted correctly in APA. Project should be at least three (3) pages in length, with additional Title and Reference pages. Use complete sentences and appropriate grammar and spelling. .Most economic activities on this feudal manor were related to?A. bankingB. industryC. agricultureD. cultural diffusion What is an eighth note A peach orchard owner wants to maximize the amount of peaches produced by his orchard.He cannot simply plant as many trees as he can, since planting more trees will decrease the amount of fruit that each tree produces (the yield of each tree).He has found that the per-tree yield can be described by the equationY = 1200 - 15 x.Here Y is the yield per tree and x is the number of trees planted per acre.For example, if there were 10 trees planted per acre, each tree would produce 1200 - 15 * 10 = 1050 peaches.Find the number of trees per acre that should be planted in order to produce the maximum crop and the resulting total yield.Number of trees per acre : trees per acreTotal yield : peaches per acre There are three annual coupon paying bonds with a coupon rate of 7.0%,12.0%, and 17.0%. All three bonds have a time to maturity of 25 years and a YTM of 7%. What is the duration of ech bond? Duration of: Consolidating Dry Cleaning No large companies dominate the U.S. dry-cleaning industry. The industry has some 30,000 individual businesses employing around 165,000 people. Most establishments are very small. The top 50 enterprises in the industry are estimated to account for no more than 40% of industry revenues. According to the Dry-cleaning & Laundry Institute, the median annual sales for a com- mercial dry cleaner are less than $250,000. The industry is a favored starting point for many immigrants, who are attracted by the low capital requirements. More than 80% of industry revenues can be attributed to individual retail customers, with hospitals, hotels, and restaurants accounting for much of the balance. The larger com- panies in the industry tend to focus on serving larger establishments, such as hospitals and hotels. Total industry revenues are estimated to be around $9 billion. Between 2007 and 2012 demand shrunk at 2.5% per annum. A weak economy with persistently high unemployment, the rise of "business casual" dress norms in many companies, and the development of new clothing materials that do not need dry clean- ing or pressing are all cited as reasons for the weak demand conditions. Demand for dry-cleaning services is very local. All dry cleaners within a 10-minute drive of each other are often viewed as direct competitors. Conve- nience seems to be one of the major factors leading a consumer to pick one dry cleaner over another. Dry cleaning has been described as a classic low-interest category there is very little about dry cleaning that excites consumers. The industry has defied efforts to consolidate it. The largest national dry-cleaning chain in the United States is Martinizing. Started more than 60 years ago, in 2012 Martinizing had some 160 franchisees that operate more than 456 stores. However, as recently as 2001 its franchisees operated almost 800 stores, so the company seems to have been shrinking steadily over the last decade. 1 1 E : I S 1 In the late 1990s the founders of Staples, the office supplies superstore, entered the dry-cleaning industry, establishing a Boston-based chain known as Zoots. Backed with up to $40 million in capital, they had visions of transforming the dry-cleaning industry (as they had done with office supplies), consolidating a fragmented industry and creating enormous economic value for themselves in the process. They created of cluster of 7 to 10 stores around a central cleaning hub. Each store had a drive through window, self-service lockers for leaving and picking up clothes, and one or two full-time staff members on hand to help cus- tomers. The hub had about 40 employees engaged in cleaning processes. Zoots promised to get dry cleaning done right, reliably, and conveniently, and to do this at a reasonable price. Unfortunately, Zoots found that the service-intensive nature of dry cleaning and the very high variability of clothing made it all but impos- sible to standardize processes. Costs were significantly higher than anticipated, quality was not as good as management hoped, employee turnover was high, and demand came in below forecasts. Today Zoots has less than 40 stores and remains concentrated in the Boston area. The founders are no longer involved in the busi- ness and, clearly, it did not come close to transforming the industry. 1 = : = Sources: IBIS World. "Dry Cleaners in the US: Market Research Report," October 2012: Myra M. Hart and Sharon Peyus, "Zoots: The Cleaner Cleaner." Harvard Business School. September 20. 2000; and Fulcrum Inquiry. "Valuation Guide: Dry Cleaners," www .fulcrum.com/drycleaning_appraisal.htm. CASE DISCUSSION QUESTIONS 1. Why do you think that the dry-cleaning industry has a fragmented structure? Part 3 Strategies needs, such as hotels and hospitals. Why do you think this is the case? 3. Why do you think that Zoots was unable to consolidate the dry-cleaning industry, despite adequate capital and the managerial talent that created Staples? 208 2. The larger enterprises in the industry seem to serve large customers with standardized 4. If you were to try to consolidate the dry- cleaning industry, what strategy would you pursue and why? Capital budgeting and capital raising are two major duties ofthe financial manager within the firm. Explain the differencesbetween these duties for the financial manager. URGENT! The old kingdom of Egypt was established after what event? A national hardware chain has decided with the growth in business in Idaho to open a distribution center that will serve four stores. Relative locations for each store have been determined, as shown in the table below. The monthly quantities to be shipped to each location are the same. Location Store A Store B Store C Store D (X,Y) 3, 5 2, 2 5, 4 6, 6 Determine the coordinates for the centralized warehouse. (Round your final answers to 2 decimal places.) Y Usually the finance department establishes who has the power torequisition, prevents unauthorized requisitions, and communicatesto suppliers that a requisition is not an order.True or False? Ben Corporation expect that individual income taz rates will decrease next year. The employees are cash basis taxpayers. At the present time the company pays employees on the last day of each month for that month. The company as considering changing itd policy so that the December salaries will be paid on the first day of the following year. What would be the effect on an employee of the proposed change in company policy of the company pays the December 2019 salaries in January of the next year?A. The employee would be required to recognize the income in December 2019 because it iscontructively received at the end of the monthB. The employee would be required to recognize in December 2019 because the employee has a claim og right to the indome when it is earnedC. The employee will not be required to recognize the income will it is received, in 2020D. The The employes can elect to enther itselude the pay in either year If, on a given day, vapor pressure is 3mb and saturation vapor pressure is 10mb, what is relative humidity? 7 percent 30 percent 3.3 percent 13 percent The typical mortgage loan is a collateralized, 100% non-recourse loan. A) True B) False years When you retire, your plan is to withdraw $7,000 at the end of each month for the next 25 from your retirement account. In addition, at the end of the 25th year, you would like the account to have $100,000 left that will be donated to the Atlanta Symphony Orchestra. Assume that your account can earn a return of 6% annually during the retirement period. How much money should you have accumulated in your retirement account in order to be able to achieve the above objectives? A) $959,619.44 B) $892,512.58 C) $1,016,682.87 D) $1,108,844.62 E) $1,086,448.05 Question 56 (1 point) The process of adding the interest earned on an investment to the original investment in order to earn more interest is called: A) indexing. OB) discounting. OC) multiplying. OD) compounding. OE) duplicating. Question 60 (1 point) Using replacement chain in the case of mutually exclusive projects with unequal life spans, the project with the largest equivalent annual annuity (EAA) should be rejected. A) True B) False tiyleah has a cousin fantasia in france . both families recently bought new cars and the two girls are comparing how fuel efficient the two cars are . tiyleah explains to fantasia that her family's car is getting 40 miles per gallon. fantasia has no idea how that compares to her family's car because in france mileage is measured differently. she tells tiyleah that her family's car uses 7 liters per 150 km . which car is more fuel efficient. List all conversion ratios/factors needed to answer this question. Show all work in finding which car is more fuel efficient. In a system using the relocatable dynamic partitions scheme, given the following situation (and using decimal form): Job Q is loaded into memory starting at memory location 42K.a. Calculate the exact starting address for Job Q in bytes. 42K*1024=43008b. If the memory block has 3K in fragmentation, calculate the size of the memory block.3k*1024=307242k*1024 =430083072+46080=46080c. Is the resulting fragmentation internal or external? Explain your reasoning.fragmentation internal or external In the long run, an increase in the demand for investment pushes the real interest rate, encourages households, and leads to a output. O a. up; more; higher O b. down; less; higher O c. up; less; lowe Is Coca-Cola stock a buy/sell/hold? Please explain your answer referencing the company numbers/dividend/overall stock market, etc..You may also include photos to helpThank you in advance. In (1,000-1,250 words), summarize Hulu's vision and intended marketing strategy. PLEASE HAVE IT BE 1,000 words!!In the summary, include the following components:1. Provide a description of the products/services the company offers, its target market, and the general marketing strategy that you would expect to use for that product or service.2. Based on the company you selected, describe how you will forecast sales, and explain how you will research and approach the country/target/market.3. Describe how culture impacts consumer behavior and marketing.4. Explain how global, political, and legal forces will impact the marketing strategy. 5.Analyze the reasoning behind your financial estimates and include a list of the key elements of your international marketing plan. Human rights legislation determines that under certain circumstances : Unintentional indirect discrimination is acceptable. Unintentional indirect discrimination is unacceptable . Intentional direct discrimination is acceptable . Unintentional direct discrimination is acceptable .