Answer:
Using C++ to solve the problem as given below
Explanation:
#include<iostream>
#include<string.h>
using namespace std;
int main()
{
string salsa_name[5]={"mild","medium","sweet","hot","zesty"};
int jar_sale[5]={0,0,0,0,0};
int i;
int total=0;
int high=0;
int high_index=0;
int low=0;
int low_index=0;
int temp=0;
for(i=0;i<5;i++)
{
while(temp<=0)
{
cout<<"enter the number of jars sold for "<<salsa_name[i]<<" ";
cin>>temp;
if(temp<=0)
cout<<"invalid data. please try again\n";
}
jar_sale[i]=temp;
temp=0;
}
cout<<"name\t jars sold\n";
cout<<"\n---------------------------\n";
for(i=0;i<5;i++)
{
cout<<" "<<salsa_name[i]<<"\t\t"<<jar_sale[i]<<"\n";
}
low=jar_sale[0];
for(i=0;i<5;i++)
{
total=total+jar_sale[i];
if(jar_sale[i] >= high)
{
high_index=i;
high=jar_sale[i];
}
if(jar_sale[i]<=low)
{
low_index=i;
low=jar_sale[i];
}
}
cout<<"\n total sale : "<<total;
cout<<"\n high seller : "<<salsa_name[high_index];
cout<<"\n low seller : "<<salsa_name[low_index];
}
Answer:
All of the above.
Explanation:
Thrashing or drive or disk thrashing occurs when the hard drive is stressed with transferring information between the system memory and virtual machine excessively. In thrashing, there is a large number of processes running in the system and the system memory is too small to handle all processes. Thrashing leads to decreased system performance and hard disk failure.
To stop the impact of thrashing, install more RAM, end unimportant progam processes etc.
Answer:
1.) Relative cell reference - A1
2.) Absolute cell reference - $D$2
3.) Mixed cel reference - $D2
Explanation:
In Microsoft Excel, cell references are very important and critical when dealing with formula. They can give you what you’re looking for or make your entire worksheet incorrect.
A cell reference is a cell address or a range of cell addresses that can be used in a formula.
There are three types of cell references and they are;
a) Relative reference
b) Absolute reference
c) Mixed reference
A relative cell reference is a cell reference that changes when you copy the formula to other cells. It s usually just a normal cell reference like A1, B2, C3. If a formula with a relative cell reference is copied down to other cells, the formula will change. That is a formula with a relative cell reference changes with respect to the cell which it is copied to.
An absolute reference does not change when you copy the formula to other cells. In absolute references, the dollar sign $ is used to “lock” both the row and column so that it does not change when it is copied to other cells. An example is $D$2.
Using a mixed cell reference, one is trying to see that only either the row or column changes with respect to other cells when they are copied. It is like “locking” either the column or the row while changing the other. Just like from the example, $D2 is a mixed cell reference where only the column is locked such that only the row changes when the formula is copied to other cells.
The answer to your question is b crowding out effect
Answer:
Given
The above lines of code
Required
Rearrange.
The code is re-arrange d as follows;.
#include<iostream>
int main()
{
int userNum;
scanf("%d", &userNum);
if (userNum > 0)
{
printf("Positive.\n");
}
else
{
printf("Non-positive, converting to 1.\n");
userNum = 1;
printf("Final: %d\n", userNum);
}
return 0;
}
When rearranging lines of codes. one has to be mindful of the programming language, the syntax of the language and control structures in the code;
One should take note of the variable declarations and usage
See attachment for .cpp file