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
erma4kov [3.2K]
3 years ago
6

The difference between a want and a need is a want is not necessary for survival. Things necessary for survival are known as ___

____.
A. needs
B. wants
C. desires
Computers and Technology
1 answer:
Zarrin [17]3 years ago
8 0
A.Needs since they are necessary and needed for survival 
You might be interested in
Write a program that generates a random number between 5 and 15 and asks the user to guess what the number is. If the user’s gue
stepan [7]

Answer: The c++ program for the number guessing game is given below.

#include <iostream>

using namespace std;

// method declaration without parameters

void game();

int main() {    

char reply;

// calling the game method

game();  

cout<<"Would you like to continue with the game ? Enter y to continue. Enter q to quit the game. " <<endl;

cin>>reply;  

if(reply == 'y')

    game();      

if(reply == 'q')

    cout<<"Quitting the game..."<<endl;  

return 0;

}

void game()

{

   int num, guess, attempt=0;  

num = (rand() % 10) + 6;  

cout<<endl<<"Welcome to the game of guessing the correct number "<<endl;  

   do

{    

    cout<<"Enter any number between 5 and 15. "<< endl;

    cin>>guess;      

    if(guess<5 || guess>15)

    {

        do

        {

            cout<<"Invalid number. Enter any number between 5 and 15. "<<endl;

            cin>>guess;

        }while(guess<5 || guess>15);

    }  

    if(guess < num)

    {

        cout<<"Too Low"<<endl;

        attempt++;        

    }

    if(guess > num)

    {

        cout<<"Too High"<<endl;

        attempt++;          

    }      

}while(guess != num);  

cout<<"Congratulations. You figured out my number in "<<attempt<< " attempts."<<endl;

}

Explanation:

The expression

(rand() % 10)

generates a random number between 0 and 9. 6 is added to generate a random number between 5 and 15.

The integer variable attempt is initialized to 0.

Next, user is asked to guess the number. If the user enters an invalid input, the do-while loop begins until a valid input is received from the user.

    cout<<"Enter any number between 5 and 15. "<< endl;

    cin>>guess;      

    if(guess<5 || guess>15)

    {

        do

        {

            cout<<"Invalid number. Enter any number between 5 and 15. "<<endl;

            cin>>guess;

        }while(guess<5 || guess>15);

    }  

User is prompted to input the guess using the same do-while loop as above. Until the user guesses the correct number, the loop continues. Each incorrect guess by the user, increments the variable attempt by 1. This represents the number of attempts done by the user to guess the correct number.

    if(guess < num)

    {

        cout<<"Too Low"<<endl;

        attempt++;        

    }

    if(guess > num)

    {

        cout<<"Too High"<<endl;

        attempt++;          

    }  

The random number generation and the guessing logic is put in a separate method game().

The entry and exit from the game only is put inside the main method.

4 0
4 years ago
What would you use to exit from a for each activity and continue the execution of the workflow?
mr_godi [17]

Answer:

Break activity

Explanation:

The Break activity simply allows a user to stop the loop at any point chosen, and then continue with another activity or the next activity.

4 0
3 years ago
5. What skill is unique to reading online?
torisob [31]
Ignoring distractions like hyperlinks and advertisements
6 0
3 years ago
For each item, identify the way it is usually addressed in the software industry. Applying a bug fix: Addressing a security flaw
Sonja [21]

Answer:

(patch)

(patch)

(new version)

(new version)

Explanation:

gimme my 5 stars

6 0
3 years ago
Read 2 more answers
How do computers perform complicated tasks built from simple instructions?
wlad13 [49]
They use and perform a set of actions and programs that build on each other.
8 0
4 years ago
Other questions:
  • Convot the following biliary number into decimal form using any method ? (1010.100)2
    8·1 answer
  • In the windows firewall, any rules preceded by a __________ checkmark have not been enabled. black gray green red
    13·1 answer
  • What is the answer to this?
    12·1 answer
  • Prompt the user for a character and the height of a right triangle. Then, print a triangle of that height using the character en
    11·1 answer
  • Once the human body stops moving in a crash, the internal organs stop as well. True or false?
    11·1 answer
  • Describe what each of the following functions in R do.1. t2. matplot3. c4. seq5. legend6. matrix7. rownames8. colnames9. type of
    14·1 answer
  • Words or symbols that help you narrow down your search are called:
    12·1 answer
  • The script in the dynamic data section of the Web page template will check the value of the ____ array if the get method is used
    8·1 answer
  • When using the text command, what needs to be around the word or words you<br> want to appear?
    10·1 answer
  • What is a query? State it's uses.​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!