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
Igoryamba
3 years ago
8

Write a program that generates a random number between 1 and 100 and ask the user to guess what the number is. if the user's gue

ss is higher than the random , number, the
Computers and Technology
1 answer:
Mars2501 [29]3 years ago
4 0
You didn't specify a language, so here it is in C++.


#include <iostream>
#include <ctime>

int main()
{
    srand(time(NULL));

    int random, guess;

    random = rand() % 100 + 1;
    std::cout << "Random number generated!\nGuess the number: ";

    std::cin >> guess;

    if (guess == random)
        std::cout << "Yes!";
    else
        std::cout << "No!";

    return 0;
}
You might be interested in
The class attribute a. can be applied to only one element in an HTML document b. determines the copy that will be displayed when
Nuetrik [128]

Answer:

The answer is likely C. "Can be used by CSS to apply the same formatting to more than one HTML element."

Explanation:

Given that the name of the attribute is "class," it sounds like the kind of code that would be applied to multiple elements intended to display something a specific way.

Qualification:

I've invested hours of my time into learning HTML, but I've never dealt with the "class" attribute. So, maybe take my answer as a grain of salt.

4 0
3 years ago
Different uses of quick access toolbar
zhannawk [14.2K]
“The Quick Access Toolbar provides access to frequently used commands, and the option to customize the toolbar with the commands that you use most often. By default, the New, Open, Save, Quick Print, Run, Cut, Copy, Paste, Undo, and Redo buttons appear on the Quick Access Toolbar” -Information Builders
5 0
3 years ago
What to do when microsoft word is eating your words?
Aloiza [94]
Update it so it wont do that
4 0
3 years ago
Risk of new technology is NOT evaluated by asking questions during which phase?
neonofarm [45]

Answer:

the answer is D

Explanation:

hope this helps :)

4 0
3 years ago
Which is the best video games​
Travka [436]

Answer:

overwatch and dead by daylight

5 0
3 years ago
Read 2 more answers
Other questions:
  • Given the security levels TOP SECRET, SECRET, CONFIDENTIAL, and UNCLASSIFIED (ordered from highest to lowest), and the categorie
    13·1 answer
  • Write a Python program that reads the CSV file, compares the population estimates of every row for 2010 and 2017 and computes th
    10·1 answer
  • Brainstorming the pros and cons of upgrading versus replacing a set of ten desktop computers _________
    6·1 answer
  • It keeps saying “something is going wrong oops!” when i click on my brainly notifications what do I do
    9·1 answer
  • If you have an equipment failure while driving on an expressway, you should
    8·1 answer
  • Which line of code outputs the decimal portion of a float stored in the variable x? print (x % 1000) print (x) O print (x / 1000
    13·1 answer
  • Question 8 (True/False Worth 3 points)
    15·1 answer
  • Write a program that uses the Purchase class in 5.13. Set the prices to the following: Oranges: 10 for $2.99 Eggs: 12 for $1.69
    11·1 answer
  • What instructions would a computer have the hardest time completing correctly
    12·1 answer
  • What is the total number of time zones that can be configured to show by default in a calendar in Outlook 2016?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!