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
Artyom0805 [142]
3 years ago
9

#include <iostream>

Computers and Technology
1 answer:
nikklg [1K]3 years ago
7 0

Answer:

you did not include the "using namespace std; " and the "intmain() "

You might be interested in
Choose a simple way to let a VPN into your VPC continue to work in spite of routing changes.
Slav-nsk [51]

Answer:

Through cloud router

4 0
3 years ago
Create a program that will play the “cows and bulls” game with the user. The game works like this: Randomly generate a 4-digit n
riadik2000 [5.3K]

Answer:

Welcome to the Cows and Bulls Game!

 Enter a number:

 >>> 1234

 2 cows, 0 bulls

 >>> 1256

 1 cow, 1 bull

 ...

"""

import random

def compare_numbers(number, user_guess):

   cowbull = [0,0] #cows, then bulls

   for i in range(len(number)):

       if number[i] == user_guess[i]:

           cowbull[1]+=1

       else:

           cowbull[0]+=1

   return cowbull

if __name__=="__main__":

   playing = True #gotta play the game

   number = str(random.randint(0,9999)) #random 4 digit number

   guesses = 0

   print("Let's play a game of Cowbull!") #explanation

   print("I will generate a number, and you have to guess the numbers one digit at a time.")

   print("For every number in the wrong place, you get a cow. For every one in the right place, you get a bull.")

   print("The game ends when you get 4 bulls!")

   print("Type exit at any prompt to exit.")

   while playing:

       user_guess = input("Give me your best guess!")

       if user_guess == "exit":

           break

       cowbullcount = compare_numbers(number,user_guess)

       guesses+=1

       print("You have "+ str(cowbullcount[0]) + " cows, and " + str(cowbullcount[1]) + " bulls.")

       if cowbullcount[1]==4:

           playing = False

           print("You win the game after " + str(guesses) + "! The number was "+str(number))

           break #redundant exit

       else:

           print("Your guess isn't quite right, try again.")

Explanation:

7 0
4 years ago
PLEASE HELP ME ASAP!!!!
coldgirl [10]

First party insurance: Loss due to laptop theft, loss due to interruption in business activities due to website failure

Third party insurance: cost of lawsuits filed against the policyholder, fees of a special programmer investigating a cyber fraud, expenses of providing notifications of the cyber attack to clients and employees

8 0
3 years ago
Write code to print the location of any alphabetic character in the 2-character string passCode. Each alphabetic character detec
Flauer [41]

Answer:

//Program written in Java Programming Language

// Comments are used for explanatory purpose

import java.util.Scanner; //Scanner Library Imported

public class findloc { //Program Class Declared

public static void main (String [] args) {//Program Main Method

Scanner input = new Scanner(System.in);

string passCode; // Declare string passCode

passCode = Input.next();//Input Passcode

if(Character.isLetter(passCode.charAt(0)))//Check Alphabet Position

{

System.out.println("Alphabetic at 0");//Print Alphabet position is at 0

}

if(Character.isLetter(passCode.charAt(1))) //Check Alphabet Position

{

System.out.println("Alphabetic at 1");//Print Alphabet position is at 1

}

}

}

4 0
3 years ago
​what is the difference between a normal mouse and trackball? What do you think. ​​​​
user100 [1]

Answer:

A mouse consists of a metal or plastic housing or caring, a ball at its base and is rolled on a flat horizontal surface.

Explanation:

8 0
3 years ago
Other questions:
  • While shopping online for gardening supplies, Lana visits a website she had heard advertised on Home and Garden Television (HGTV
    5·1 answer
  • Of the following occupations, which is predicted to have the greatest job growth?
    7·2 answers
  • One out of how many people in the world has a Fac3book account?
    8·1 answer
  • A Network Management Station (NMS) is using SNMP to manage some Cisco routers and switches with SNMPv2c. Which of the following
    10·2 answers
  • Let’s use that simple branch instruction to do the following: Load the two words declared in the data statement shown to the rig
    14·1 answer
  • What does the /var directory contain?
    7·1 answer
  • Explain why interrupt times and dispatch delays must be limited to a hard real-time system?
    8·1 answer
  • These are horizontal blocks of cells running across the entire width of the spreadsheet.
    11·1 answer
  • You need to implement a class that represents the state of a room or game section. The class will contain a room_id, a descripti
    15·1 answer
  • Ethan is afraid that his poor grades will get him kicked out of his university at the end of the semester. He decided to remotel
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!