1.5 code practice question 3

Answers

Answer 1

Answer: What the hell is that 243 suppose to be

Explanation:uhg


Related Questions

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

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

Answers

Answer:

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

Explanation:

Before the digital communication system, early human makes communication through signs and gestures and send messages to others by a number of different methods. They could send their messages through signals with fire and smoke, drums, or whistles. The early method of communication had two limitations: first, they were restricted by the time in which communication took place. Second, they were restricted by a place that could be used only between people more or less close to each other.

They navigate through signals and signs, for navigation they search for footprint, smoke, etc to search the populated area.  The compass is the old measure they used for navigation. They travel through horses and other means of traveling they mostly use animals in their traveling for convenience. As people get advances, they used other means of sending messages to each other through letters, then the telegraph took place and telephone.

Beginning with digital communication, such as sending emails, letters, video, and audio chat make the world shrink in the global village.

People now communicate with each other in half of second with each other using new means of communication such as "s k y p e", "what s app", etc.

Now with the use of digital communication, the distance gets shrink among people. One can talk while one setting at a different corner of the world to another corner of the world in seconds. Digital communication made life simple and easy.

People can navigate through new means easily such as using "goo gl e map" etc.

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.

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.  

Warm up: Variables, input, and casting
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space.
Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs.
Enter integer: 99 Enter double: 3.77 Enter character: Z Enter string: Howdy 99 3.770000 z Howdy
(2) Extend to also output in reverse.
Enter integer: 99 Enter double:
3.77 Enter character: z Enter string: Howdy 99 3.770000 z Howdy Howdy z 3.770000 99
(3) Extend to cast the double to an integer, and output that integer.
Enter integer: 99 Enter double: 3.77 Enter character: Z Enter string: Howdy 99 3.770000 z Howdy Howdy z 3.770000 99 3.770000 cast to an integer is 3 LAB ACTIVITY 2.29.1: LAB: Warm up: Variables, input, and casting 0/5 main.c Load default template... 1 #include 2 3 int main(void) { 4 int user Int; double userDouble; // FIXME: Define char and string variables similarly printf("Enter integer: \n"); scanf("%d", &user Int); // FIXME
(1): Finish reading other items into variables, then output the four values on a single line separated by a space 19 11 12 13 14 15 16 17 18 // FIXME
(2): Output the four values in reverse // FIXME (3): Cast the double to an integer, and output that integer

Answers

Answer:

#include <stdio.h>

int main()

{

   int userInt;

   double userDouble;

   char userChar;

   char userString[50];

   

   printf("Enter integer: \n");

   scanf("%d", &userInt);

   

   printf("Enter double: \n");

   scanf("%lf", &userDouble);

   

   printf("Enter character: \n");

   scanf(" %c", &userChar);

   

   printf("Enter string: \n");

   scanf("%s", userString);

   

   printf("%d %lf %c %s \n", userInt, userDouble, userChar, userString);

   printf("%d %lf %c %s %s %c %lf %d \n", userInt, userDouble, userChar, userString, userString, userChar, userDouble, userInt);

   printf("%d %lf %c %s %s %c %lf %d %lf cast to an integer is %d \n", userInt, userDouble, userChar, userString, userString, userChar, userDouble, userInt, userDouble, (int)userDouble);

   return 0;

}

Explanation:

In addition to int and double, declare the char and string

In addition to the int, ask the user to enter the double, char and string

Print the variables in the same order as they entered

In addition to entered order, also print the variables in reverse order - type the variables in reverse order

In addition to reverse order, print the casting value of the double as int - to cast a double to an int put (int) before the variable name

What is an example of conditional formatting? Cells in a row have a yellow background. Cells in a range with values under 10 have a red background. Cells in a column have green text. Cells in a worksheet have borders around their edges.

Answers

Answer:

Cells in a range with values under 10 have a red background.

Explanation:

Just took it :)

Answer:

A. Cells in a range with values under 10 have a red background.

Explanation: edge 2022

The smallest unit of storage is​

Answers

Answer:

Hey mate......

Explanation:

The smallest unit of storage is Bytes......

hope it helps you,

mark me as the brainliest,

follow me..........

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.

We are developing a simulator for print queues in a network, where multiple printers can receive requests from several sources. A printer is limited in the amount of data (measured in blocks) it can print in a given time period (call the time period a "step" in the simulation). The print() method is called once for each printer in each step of the simulation. If multiple requests are sent to a printer while it is in the process of printing a document, it must store those requests in a queue, and then process them in a first-in first-out order. A printer can start printing a document at the beginning of a time step.

Required:
Complete the simulation (Doc, Printer, and PrintQueueTester). You will need to complete the Printer and Doc classes (do not add any fields to the Doc class, and do not change the API), and use the PrintQueueTester class to test your solution.

Answers

Answer:

True

Explanation:

The IT infrastructure comprises of seven major categories or domains. They are user, workstation, LAN, LAN/WAN, remote access, system /application storage, and WAN.

The user domain is the various accounts in the networked office within a workstation and other workstations in the network. The user domain provides a platform or medium to interact with the other six domains, making it possible for forensic investigation to be carried out, retrieving logs for easy account management.

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:

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);

Write the statements needed so that the variable secondWord is associated with the second word of the value of sentence . So, if the value of sentence were "Broccoli is delicious." your code would associate secondWord with the value "is" .

Answers

Answer:

Explanation:

String str = "Broccoli is delicious.";

String[] Secondstr = str.split(" ");

System.out.println("second word is " + Secondstr[1]);

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

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].

What are some methods of cyber bullying ?

Answers

Answer:

HARASSMENT

IMPERSONATION

INAPPROPRIATE PHOTOGRAPHS

WEBSITE CREATION

VIDEO SHAMING

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.  

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:

what is wrong with my code?

using System;

namespace FavoriteNumber
{
class Program
{
static void Main(string[] args)
{

Console.Write("Enter your favorite number!: ");
int faveNumber = Console.ReadLine()
int number = Convert.ToInt32("string value")
will give 30 points to who ever is right

Answers

Answer:

namespace FavoriteNumber

{

   class Program

   {

       static void Main(string[] args)

       {

           Console.Write("Enter your favorite number!: ");

           string faveNumber = Console.ReadLine();

           int number = Convert.ToInt32(faveNumber);

           Console.Write($"Your favorite number seems to be {number}");

       }

   }

}

Explanation:

You were close. Spot the differences. A statement should end with a semicolon. Console.ReadLine() returns a string. That string is the input of what you want to convert to an int.

And of course you need to match each opening brace { with a closing brace }.

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)

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

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.

3.2 code practice question 1

Answers

Answer:

Not enough question content.

Explanation:

Narrow margins are helpful for which task?
fitting the most content on a page
spreading out content onto more pages
aligning content in the center of a page
placing the content on the left side of a page​

Answers

Answer: A: fitting the most content on a page

Explanation:

Trust me my guy

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)

(01.05 LC)

When a user responds to a prompt, their response is known as __________.

input
output
text
value

Answers

The answer is input! because the input is what the user enters, the output is what comes out from that, and the text and value aren’t related to the user
Their answer is known as an input, because they are saying what they know/think. Sorry if this didnt help have a nice day though^^

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:

What level do you get Super Saiyan God in Dragon ball final stand

Answers

Answer:

God Forms (SSJG - SSB KKx10) Unlocked at level 270, for 50,000 Zeni.

Explanation:

Answer:

Unlocked at level 270, for 50,000 Zeni.

Explanation:

#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

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

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.

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.

Other Questions
please help me with this Explain three GSBC principles violated in the Madoff case. A car rental company has to supply cars to the following cities in the numbers as given below: The company has three branches from which the cars may be supplied. On the day in question, the inventory status of each of the branches was as follows: The distances between branches and destinations are given by the following table: Plan the day's activity such that supply requirements are met at a minimum cost (assumed proportional to car-miles travelled). Difficulty Level: Easy Which of the following would appear on a balance sheet under the category share capital?a. dividends declaredb. dividends paidc. retained earningsd. preferred shares Determine the IRR of a project with the following cash flow diagram and select the closest answer. 0 2 $350 3 $375 11 12 explain in detail about the policies that were adopted from the nonMuslims by Aurangzeb (I will make you brainliest) An MPS record has all the following characteristics, exceptGroup of answer choicesIt has four rowsIt has three rowsIt shows plan for the whole planning horizonIt is time phased 0.008 times what equals 0.08 Which of the following examples shows Aristotelian ethics? a. Yui told her manager about an employee cutting corners because she knew if every employee did this, the company would fold. b. Yuto did not report a product defect because doing so would put 50 of the company's 90 employees out of work. c. Nanami fired 20 employees because doing so enabled her company, with its 70 remaining employees, to say in business. d. Koki used a code of conduct to support his report about unethical conduct by an employee. e. Saki blew the whistle on her company because she knew that her mother, an honest person, would do the same. Sketch a graph of a cubic function with exactly 2 real roots. Kimiko works at the drive-thru window in a fast-food restaurant. At the end of a 2-hour shift, the display at her window shows that she took an average of 1 minute and 20 seconds to serve each customer. How many customers came through the drive-thru during those 2 hours? PLSSSSSS Help True OR False 3- Find the Domain (ONLY) for each of the following functions (60 points - 10 each) 2 2 a) f(x) = x 3x4 b) f(x) = = c) M(x)=x - 5 x-3 10 d) g(x) = e) h(x) = a) f(x) = 2 x +9 x-4 16 miler cinca full tank x 2x-5 2 2x-15 I A basketball player is considering signing a one-year contract. If she puts in High effort, there is a 30% chance that the team makes the playoffs. If she puts in Low effort, there is a 20% chance that the team makes the playoffs. The player receives utility from money earned, and incurs a utility cost equivalent to $500000 if they putin High effort. The player has an alternative contract offer that will pay her $1,000,000, andrequires Low effort.The team offers the player a base salary, and a bonus if the team makes the playoffs. What is the minimum bonus that would provide sufficient incentive for the player toput in High effort? We normally believe that asset prices reflect the situation in the economy. However, it is also commonly believed that asset prices themselves influence investment decisions of firms. Explain why investment decisions can depend on asset prices, how asset prices can send a wrong signal to firms, and what consequences for the macroeconomy this may have. Give examples. Find solutions for your homeworkbusinessoperations managementoperations management questions and answerswhat would be the primary, secondary, and tertiary types of hotel guests for key west? what would be the group mix? why is it important for a property to attract several types of travelers? besides the major hotel categories, what "other hotel categories" would most appeal to this market?Question:What Would Be The Primary, Secondary, And Tertiary Types Of Hotel Guests For Key West? What Would Be The Group Mix? Why Is It Important For A Property To Attract Several Types Of Travelers? Besides The Major Hotel Categories, What "Other Hotel Categories" Would Most Appeal To This Market?What would be the primary, secondary, and tertiary types of hotel guests for Key West? What would be the group mix? Why is it important for a property to attract several types of travelers? Besides the major hotel categories, what "other hotel categories" would most appeal to this market? An investor has two bonds in her portfolio, Bond C and Bond Z. Each bond matures in 4 years, has a face value of $1,000, and has a yield to maturity of 8.6%. Bond C pays a 11% annual coupon, while Bond Z is a zero coupon bond. a. Assuming that the yield to maturity of each bond remains at 8.6% over the next 4 years, calculate the price of the bonds at each of the following years to maturity. b. Plot the time path of prices for each bond. Activity 2-2: Mass Marketing vs. Target MarketingIntroductionA marketing manager's planning job is to find attractive market opportunities and develop effective marketing strategies. A marketing strategy consists of two interrelated parts: (1) a target marketa relatively homogeneous group of customers to whom a company wishes to appeal, and (2) a marketing mixthe controllable variables which the company puts together to satisfy this target group (the 4Ps).Here, it is important to see the difference between mass marketing and target marketing in developing marketing strategies.AssignmentThis exercise is designed to illustrate the difference between mass marketing and target marketing. Read each of the following cases and, for each case, (a) indicate whether each firm is following a mass-marketing or a target-marketing approach, and (b) briefly explain your answers.1. Green Vision Corp. has just introduced a new type of lawn sprinkler called the "Summer Shower Sprinkler" and it is being promoted as the "ultimate lawn sprinklermore convenient than rain." According to Green Visions president, the sprinkler is "absolutely guaranteed" not to leak, rust, or break. Moreover, "when it is turned on, the water pressure makes it crawl along the hose so that different areas get watered without having to touch or move the sprinkler." Available in several models ranging in price from $25 to $60, it is expected to sell "in the millions." "This product is so superior," say company officials, "that no household in the United States will want to be without one."a) Mass marketing or target marketing? (circle one)b) Briefly explain your answer.2. Amir Abdelkader recently retired after 20 years of service as a chef for a luxury cruise line. During his career, he worked on ships that took him to almost every part of the world. In the process, he learned to prepare the favorite dishes of many different countries. Amir and his partner have decided to use their savings to open an ethnic restaurant, but with a difference. Each week they will feature the cuisine of a different region. Amir is sure that their restaurant will be an outstanding success. "We want to be a destination restaurant," he says, "a place where adventurous folks want to come for special meals and service to celebrate special occasions. Our prices wont be cheap, but that will help us afford special promotional mailings to the upscale professionals who live within driving distance of the restaurant."a) Mass marketing or target marketing? (circle one)b) Briefly explain your answer. A few mold spores land on the skin but do not survive due to the lack of moisture and the presence of oxygen. These spores have been prevented from harming the body by which type of barrier?biologicalchemicalphysicalmechanical a coin is placed on a turntable 13 cm from the center. the coefficient of static friction between the coin and the turntable is 0.11. once the turntable is on, its angular acceleration is 1.2 rad/s2. how long will it take until the coin begins to slide?