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
N a MenuStrip, if you create each main menu item with a(n) ____ in front of a unique letter, then the user can press Alt and the
Zolol [24]

Answer:

C) &

Explanation:

In the C# programming language a MenuStrip adds a custom menu bar to the program that you are making in which you can create unique menu items. When doing so, if you create a menu item with an & in front of a unique letter, the user can press ALT and the letter to activate the menu choice. These shortcuts are known as Access Keys.

8 0
3 years ago
All of the information on the Internet has been verified and is factual. <br> a. True<br> b. False
Hitman42 [59]
False because someone could lie on the internet to imoress someone
5 0
4 years ago
Read 2 more answers
Will give brainliest to whoever can answer all of these questions correctly.
babymother [125]

false

ppt

chips designed to preform a function

Apologize to the customer for the inconvenience and offer to refund his money or replace the item

OneDrive-CollegeWork-FreshmanYear-NameOfClass

true

Social networking

paragraph

true

complete fill

true


 

7 0
4 years ago
Read 2 more answers
Asia pacific and Japanese sales team from cloud kicks have requested separate report folders for each region.The VP of sales nee
MaRussiya [10]

Answer:

B) Create all new regional folders and move the reports to the respective region folder with viewer access.

Explanation:

Below are the options

A) Create grouped folders, keeping the top region folder sharing settings and limiting the sharing settings for the grouped folders for each region.

B) Create all new regional folders and move the reports to the respective region folder with viewer access.

C) Create all new regional folders and move the reports to the respective region folder with subscribe access.

D) Create subfolders, keeping the top region folder sharing settings and limiting the sharing settings for the subfolders for each region

In order to required reports at one place and also wants to retain the visibility for each folder the consultant should suggest that all new regional folders should be created and afterwards it would be moved to their relevant region folders by involving the viewer access feature so that the VP should access it anytime

Hence, the correct option is B.

3 0
4 years ago
What option defines green computing?
Alina [70]
Green computing is the environmentally responsible and eco-friendly use of computers and their resources. In broader terms, it is also defined as the study of designing, manufacturing/engineering, using and disposing of computing devices in a way that reduces their environmental impact.
8 0
3 years ago
Other questions:
  • A differential backup covers what data on a system?
    13·1 answer
  • The most commonly used video formats are the mpeg-____ format, the windows media audio/video format, and the audio visual interl
    12·1 answer
  • If a windows computer belongs to a domain, all security is managed by the network administrator for the entire network. true
    15·1 answer
  • Which soft skill involves the ability to work harmoniously with your colleagues and improve productivity?
    14·1 answer
  • To save time and avoid formatting errors, you can use the__ to apply custom formatting to other places in your presentation and
    13·1 answer
  • The Gas-N-Clean Service Station sells gasoline and has a car wash. Fees for the car wash are $1.25 with a gasoline purchase of $
    13·1 answer
  • Houston want to have a quick conversion with his friend about an upcoming school activity. which type of website would be most u
    12·2 answers
  • Why are visually interesting effects, such as WordArt, to be used sparingly?
    5·2 answers
  • The __________ was the first all electronic computer.
    5·1 answer
  • Which component is responsible for collecting and consolidating data from network devices that are being monitored with snmp?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!