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
Alinara [238K]
3 years ago
14

Write a program that allows the user to play a guessing game. The game will choose a "secret number", a positive integer less th

an 10000. The user has 10 tries to guess the number.
Computers and Technology
1 answer:
Burka [1]3 years ago
8 0

Answer:

// This program is written in C++

// Comments are used for explanatory purpose

// Program starts here

#include<iostream.h>

#include<stdlib.h>

int main()

{

// Declare variables

int num, selectno;

string status;

randomize();

//Generate random number;

num=rand()%10000;

// Prompt to guess a number

cout<<"You have only 10 tries\nTake a guess: ";

int tries = 0;

while (tries != 10)

{

cin>>selectno;

if(selectno == num){

cout<<"You passed at the "<<count+1<<" attempt";

tries = 10;

}

else

{

cout<<"You failed. Take another guess\n You have "<<10 - count + 1 <<" attempts";

}

tries++;

if(tries >= 10)

{

break;

}

}

return 0;

}

You might be interested in
Do software engineers save millions of dollars in usa
SCORPION-xisa [38]
Yes. They make a lot of money. So eventually after saving your Money, you will make a least 1 million dollars or more.
4 0
2 years ago
The primary stream fed by tributaries within a dendritic drainage network is termed a ________ stream
a_sh-v [17]
<span>TRUNK. In a dendritic system, there are many smaller rivers or streams (the "twigs" of the tree), which are then merged into the tributaries of the main river (the branches and the trunk of the tree, respectively). They tend to develop in V-shaped valleys</span>
6 0
3 years ago
Simplest way to start baking career is to attend_______.<br><br><br><br>​
ivolga24 [154]
...attend course
I hope my answer helps.
7 0
3 years ago
Select all the correct answers.
krok68 [10]

Answer:

Higher resolutions in games

Smoother, faster playback

Explanation:

A graphics card is a piece of hardware installed on a computer that that is responsible for rendering the image on the computer's monitor or display screen. Graphics cards come in many varieties with varying features. The CPU will send any graphics related tasks directly to the GPU while it continues to process other tasks. Because graphics cards use a lot of power they need a cooling fan. The cooling fans are noisy so they make the computer sound louder than they were before the graphics card was installed.

7 0
2 years ago
Read 2 more answers
The production team for a fictional drama is shooting a key scene. One of the actors leaves out part of his scripted dialogue th
denis-greek [22]

Answer:

at last sentence was . The editor's work .

8 0
3 years ago
Read 2 more answers
Other questions:
  • The HR department of a company wants to send out an email informing its employees about an upcoming social event. Which email ap
    11·2 answers
  • Write the include directive that allows use of the function headers in the file myFuncs.h.
    13·1 answer
  • Which of the following definition below describes a wall opening?
    6·2 answers
  • In batch operating system three job J1 J2 and J3 are submitted for execution each job involes an I/O activity a CPU time and ano
    13·1 answer
  • Write a program, named NumDaysLastNameFirstName.java, which prompts the user to enter a number for the month and a number for th
    13·1 answer
  • Why do we use a design process?
    13·2 answers
  • A keyboard would be considered _____. Select 2 options.
    13·2 answers
  • What are some things you think are worthwhile and are willing to work harder to accomplish? Check all that apply.
    5·1 answer
  • Im a beginner programmer. what languages should i learn and how do i get better
    13·1 answer
  • Computer science student jones has been assigned a project on how to set up sniffer. What just he keep in mind as part of the pr
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!