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
svp [43]
4 years ago
10

Write a program that assigns two integer values from standard input to the variables int1 and int2, then prints "true" if they a

re equal, and "false" if they are not. submit
Computers and Technology
1 answer:
Gwar [14]4 years ago
7 0
C# program code:

int int1;
int int2;
Console.WriteLine("Insert first number");
int1 = Console.ReadLine();
Console.WriteLine("Insert second number");
int2 = Console.ReadLine();
if (int1 == int2)
{
Console.WriteLine("true");
}
else
{
Console.WriteLine("false");
}
You might be interested in
Complete the sentence with the correct response. In a two-way selection, if the initial statement is evaluated as , the code ski
mestny [16]

Answer:

True.

The code skips the else command

Explanation:

I will answer this question with the following code segment

<em>n = 1</em>

<em>If n > 0:</em>

<em>   Print("greater than 0")</em>

<em>else:</em>

<em>   Print("not greater than 0")</em>

<em />

From the code segment above

<em>Print("greater than 0")</em> will be executed because the condition <em>If n > 0 </em>is true

Since the if condition is true, the else condition will not be executed

8 0
3 years ago
What happens? In word 2016 when the home ribbon tab is clicked on ?
RideAnS [48]

When you clicked on the ribbon tab in word 2016, you'd be brought to the home tab, where all of the basic controls are displaced for you to see.

Hope I could help! :)

5 0
3 years ago
Read 2 more answers
Given the following code char a[2][4] = { { 'c', 'a', 'r', 'b' }, { 'i', 'k', 'e', '\0' } }; char *p = &amp;a[0][0]; while (*p !
adell [148]

Answer:

You'd get a compiling error.

Explanation:

Since this code is presumably written in C++, it doesn't include an "int main()", and without it you'll have a compiling error when you create functions. Since the start of a C++ program is looking for "int main()" and one doesn't exist, the program cannot compile.

Since the only function here is the while statement, then that's what the compiler will scream at you for. If you put all of this code within an "int main()", you'll no longer have a compiling error, and you'll have "carbike" written to the console.

I hope this explanation helps! You're welcome!

7 0
2 years ago
Before making a dish, we want to check whether we already have the necessary ingredients in our pantry or whether we need to go
Leona [35]

Answer:

class Pantry(AD):

              def __init__(self, ingredients):

""" We initialize the Pantry class by passing the ingredients that were passed in to the initializer for the superclass AD"""

              super().__init__(ingredients)

              def needed_ingredients(self, recipes):

""" Given a list of recipes, computes which ingredients to buy, and in which quantity to be able to make all recipes. Can be implemented in 10 lines of code."""

              # define the object new_pantry to contain the ingredients needed

               new_pantry = Pantry({})

                ingredients_present = self

                # loop over the recipes in the list

                for recipe in recipes:

                        # convert ingredients of recipe from AD to Pantry

                        ingredients = Pantry(recipe.ingredients)

                        # subtract the recipe's ingredients from ingredients_present

                          ingredients_present = ingredients_present - ingredients

                        # loop over the ingredients_present for key in ingredients_present:

                       # if any ingredients's quantity < 0, add it to new_pantry

                                                           if ingredients_present[key] < 0:

# check if ingredient is present in new_pantry, add the quantity to existing quantity

                                                               if key in new_pantry:

                                            new_pantry[key] += -1*(ingredients_present[key])

else: # if ingredient is not present in new_pantry, make a new entry for the ingredient

                                               new_pantry[key] = -1*(ingredients_present[key])

ingredients_present[key] = 0      # set the quantity of the ingredient in ingredients_present to 0

Explanation:

I believe everything else is provided in the question.

Copy all the details you were provided in the question as it is and add the needed_ingredients in the Pantry class.

If you are getting any assertion error, Update the code to set the negative quantities in ingredients_present to 0

6 0
3 years ago
Mention one application of AI from the real world?
taurus [48]

The application of AI from the real world is the digital assistants. The benefit of using the digital assistants is that it helps in making the business more easy and reduces the burden of employees. The type of learning used is Supervised Learning.

<h3>What is Artificial Intelligence?</h3>

The AI is the application that combines the computer science with the robot datasets, that helps in problem solving. It makes the work easy for the human resources such as visual perception, speech recognition and many more.

The digital assistants is used in the companies in the form of solving the customer queries. It reduces the work load of employees of customer help desk.

Learn more about artificial intelligence, here:

brainly.com/question/22678576

#SPJ1

7 0
2 years ago
Other questions:
  • An expression using the logical operator ____ will evaluate to true when either of the compound conditions is true.
    6·1 answer
  • Identify two areas of science or technology that make your life easier, safer, or otherwise better than your grandparents lives
    10·1 answer
  • For this project you have been asked to write a program for a local store owner. The store owner wants to keep a record of the n
    5·1 answer
  • 2.3 Code Practice: Question 3
    14·1 answer
  • What does it mean to “declare a variable”? create a variable use a variable share a variable modify a variable
    11·2 answers
  • Lisa has a section of her document that she would like to include in the index. Which option should Lisa choose?
    12·1 answer
  • What is the main difference between inserting header/footer in excel and word?​
    14·1 answer
  • Which benefit does the cloud provide to star-up companies without access to large funding?
    11·1 answer
  • Is social media bringing people together or cause in sepretation?​
    11·2 answers
  • What is a drone satellite?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!