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
hodyreva [135]
3 years ago
6

What is wrong with each of the following?

Computers and Technology
1 answer:
ankoles [38]3 years ago
4 0

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

<em> shoTotal = shoNum + shoNum2;</em>

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 <em>shoNum = 10*4;</em>

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 :

<em>Dim decPrice As Decimal = 4.99;</em>

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

You might be interested in
A painting company has determined that for every 115 square feet or wall space, one gallon of paint and eight hours of labor wil
Kay [80]

The program to calculate the total paint cost and other values is given below.

#include <iostream>

using namespace std;

int main() {  

 int rooms, laborChrg = 18;

 float paintChrg;

 float feetPerRoom[rooms];  

 float paintReq, laborHrs, paintCost, laborCost, totalCost, totalsqft=0;  

 cout<<"Enter the number of rooms to be painted "<<endl;

 cin>>rooms;  

 for(int i=0; i <= rooms; i++)

 {

 cout<<"Enter the square feet in room "<<endl;

 cin>>feetPerRoom[i];  

 // shortcut operator which is equivalent to totalsqft = totalsqft +     feetPerRoom[i];

 totalsqft += feetPerRoom[i];

 }  

 cout<<"Enter the cost of the paint per gallon "<<endl;

 cin>>paintChrg;  

 laborHrs = (totalsqft/115)*8;

 laborCost = laborHrs * laborChrg;  

 paintReq = totalsqft/115;

 paintCost = paintReq * paintChrg;  

 totalCost = laborCost + paintCost;  

 cout<<"The number of gallons of paint required "<<paintReq<<endl;

 cout<<"The hours of labor required "<<laborHrs<<endl;

 cout<<"The cost of the paint is "<<paintCost<<endl;

 cout<<"The labor charges are "<<laborHrs<<endl;

 cout<<"The Total cost of the paint job is "<<totalCost<<endl;  

 return 0;

}

Explanation:

The header files for input and output are imported.

#include <iostream>

using namespace std;

All the variables are taken as float except labour charge per hour and number of rooms.

The user is asked to input the number of rooms to be painted. An array holds the square feet in each room to be painted.

cout<<"Enter the number of rooms to be painted "<<endl;

cin>>rooms;  

for(int i=0; i <= rooms; i++)

{

cout<<"Enter the square feet in room "<<endl;

cin>>feetPerRoom[i];  

totalsqft += feetPerRoom[i];

}  

The above code asks for square feet in each room and calculates the total square feet to be painted simultaneously.

All the data to be displayed is calculated based on the values of labor charge per hour and gallons of paint needed, given in the question.

laborHrs = (totalsqft/115)*8;

laborCost = laborHrs * laborChrg;

paintReq = totalsqft/115;

paintCost = paintReq * paintChrg;

totalCost = laborCost + paintCost;

All the calculated values are displayed in the mentioned order.

7 0
3 years ago
An organization’s IRP prioritizes containment over eradication. An incident has been discovered where an attacker outside of the
emmasim [6.3K]

Answer:

The correct answer is (a) Remove the affected servers from the network.

Explanation:

Solution:

Now, since the organisation top priority is more of  containment over eradication, an outbreak code that is hostile as an can be suppressed effectively by removing the web server completely from the over all network facilities or infrastructure.

Also, if the affected servers are not removed, it might affect the integrity, confidentiality of sensitive materials or documents which will be exposed to the outside world by the attacker.

4 0
3 years ago
Digital Sep <br> helps as reimagine outcomes true or false
iragen [17]

Answer:

true

Explanation:

mark me as brailyist pls

6 0
2 years ago
What was the first carbonated drink to be introduced in the US?
adelina 88 [10]
Taco bell...........................................................................................................................................................................

6 0
2 years ago
What is the name given to software that decodes information from a digital file so that a media player can display the file? har
KiRa [710]

Answer:

plug-in

Explanation:

A Plug-in is a software that provides additional functionalities to existing programs. The need for them stems from the fact that users might want additional features or functions that were not available in the original program. Digital audio, video, and web browsers use plug-ins to update the already existing programs or to display audio/video through a media file. Plug-ins save the users of the stress of having to wait till a new product with the functionality that they want is produced.

6 0
2 years ago
Other questions:
  • Who is the primary audience for demonstrations of game prototypes made by the developer?
    8·1 answer
  • For selection purposes, it is critical that application items have a proven relationship between a selection device and some rel
    5·1 answer
  • Danielle is looking for information on an accounting principle for class. She does not want to sift through a lot of information
    14·1 answer
  • What’s the answer to this question?
    15·1 answer
  • Ayudaa, 5 ejes de sistemas tecnológicos
    5·1 answer
  • What part of the meat help you identify the less tender cuts​
    13·1 answer
  • Which step in the software development life cycle involves making improvements based on user feedback?
    15·1 answer
  • Pls help have absolutely no clue how to delete this
    12·2 answers
  • 8.10 Code Practice Question 3
    6·1 answer
  • WILL GIVE BRAINLIEST!!! PLEASE HELP!!!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!