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
You view a portion of a document on the screen through a
Stells [14]

Answer:

Document window is through which we view the portion of a document.

Explanation:

We have many portions like tabs, ruler, ribbon, etc in word. There is one another feature called Document Window in word where it represents the actual view of a document in GUI (Graphical User Interface) operating system.

Here the actual contents of the page are created and the user can also insert various shapes based on the need.  Any feature in the tabs can be included in the document window. You can set the zoom size of the document according to the need.

6 0
3 years ago
Which of the following is NOT included in the entry career pathway?
SVETLANKA909090 [29]
Looking for jobs is NOT included in the entry career pathway. When you state entry career path, you need to reconsider what kind of job you are going to proceed in. 

Happy studying ^-^
3 0
3 years ago
Read 2 more answers
In a presentation, bullets in a text box will do which of the following?
lbvjy [14]
I'm almost certain that it is A. "Help you present your data with concise statements". Hope this helped :) Xx
8 0
3 years ago
Calculate the time necessary to perform a multiply using the approach described in the text (31 adders stacked vertically) if an
Rudiy27

The time that will be used to perform a multiplication using the approach is 28 time units.

<h3>How to calculate time taken?</h3>

From the information given, the following can be noted:

A = 8 (bits wide)

B = 4 time units.

The multiplication will be performed based on the adder stack. Since A = 8, then, A - 1 = 8 - 1 = 7.

Now, the time taken will be:

= 7 × B

= 7 × 4tu

= 28 tu

In conclusion, the correct option is 28 time units.

Learn more about time taken on:

brainly.com/question/10428039

5 0
3 years ago
What must devices that communicate with one another on the internet have in common?
Tomtit [17]

The most devices that communicate with one another on the internet have in common is Use the identical net protocols. Website IP addresses together with 74.125. 65.91 and 72.21.

<h3>What is the IP Address?</h3>

Every tool that communicates on the Internet, whether or not or not it's a non-public computer, a tablet, a smartphone, or something else, is assigned a completely unique figuring out range known as an IP (Internet Protocol) address.

Using the Internet, computer systems join and speak with one another, usually the usage of the TCP/IP (Transmission Control Protocol / Internet Protocol).

Read more about the internet :

brainly.com/question/1538272

#SPJ4

6 0
3 years ago
Other questions:
  • David needs to create a password. He uses "rtjjkliusfvwr." Which of the following best explains the weakness in his password?
    9·2 answers
  • Define scanning and why it’s considered one of the most important phases of intelligence gathering for an attacker. Also discuss
    10·1 answer
  • How does a hard drive work
    14·1 answer
  • What is the current when the voltage is 18 volts and the resistance is 6 ohms?
    7·1 answer
  • You want to substitute one word with another throughout your document. What tool(s) should you use?
    9·1 answer
  • A test's directions often clarify any questions a student might have about answering a response question.
    5·2 answers
  • Midday is a good time to take a portrait outside.<br> true or false?
    8·1 answer
  • 20 points for ez question lol
    9·2 answers
  • Any computer expert to help me answer this question.. am giving brainliest
    13·1 answer
  • What is the difference between the shares Folder and Sessions Folder in the Shared Folders tool?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!