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
Tom [10]
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.
Computers and Technology
1 answer:
Anni [7]4 years ago
6 0

Answer:

import java.util.Scanner;

public class num1 {

   public static void main(String[] args) {

   Scanner in = new Scanner (System.in);

       System.out.println("Enter first number");

       int int1 = in.nextInt();

       System.out.println("Enter Second number");

       int int2 = in.nextInt();

       

       if(int1==int2){

           System.out.println("True");

       }

       else{

           System.out.println("False");

       }

   }

}

Explanation:

Using Java Programming language.

Scanner Class is used to prompt user for the first number, This is stored as int1

The second number is received and stored as int2

If Statement is used to check if the are equal (outputs "true") or ("outputs "false") if they are not.

You might be interested in
Which type of weathering creates karst topography?
pentagon [3]
The answer is c carbonation
8 0
4 years ago
Assume that sentence is a variable of type String that has been assigned a value. Assume furthermore that this value is a String
disa [49]

Answer:

//get the sentence from the user

          Console.WriteLine("Enter your sentence");

           //read the user information

           string ans = Console.ReadLine();

           //check if sentence ends with period

          if(!ans.EndsWith("."))

           {

               Console.WriteLine("Sentence should end with period");

               Environment.Exit(0);

           }

           //declear empty string firstword

           string firstWord = "";

           //split the requested sentence using single space character

          string[] splitans =  ans.Split(' ');

           //assign firstword

           firstWord = splitans[0];

           //print out firstword

          Console.WriteLine(firstWord);

Explanation:

The program uses c#.

5 0
3 years ago
If you could create a social network, what would it be like? What would make it so special about the others? (If you want you ca
patriot [66]
Be able to contact and connect with other users. be able to share what your doing.
7 0
4 years ago
Write a program that ask a user to input radius of a circle and display circumference of a circle
uranmaximum [27]

Answer:

Explanation:

8

4 0
3 years ago
Certain country in the Caribbean Sea recently held an election to choose its president. Every vote cast was electronic, but unfo
lesya [120]

Answer:

Certain country in the Caribbean Sea recently held an election to choose its president. Every vote cast was electronic, but unfortunately, a recent power surge caused a malfunction in the system just before votes were counted. The only information saved consists of the following facts:

Explanation:

• All the N citizens casted their vote.

• Exactly one candidate received more than N/2 votes.

• We don’t know how many candidates there were.

You are hired to help using your expertise in algorithms.

5 0
2 years ago
Other questions:
  • Which cloud computing service model gives software developers access to multiple operating systems for testing?
    5·1 answer
  • It is essential that a security professional is able to resolve and respond to cyber law inquiries and incidents while avoiding
    14·1 answer
  • What office application has animations on the home ribbon?
    7·2 answers
  • Develop an sec (single error correction) code for a 16-bit data word. generate the code for the data word 0101000000111001. show
    6·2 answers
  • 1.2 Data transmission speed.Unit of measurement used to measure in bits per second.1000 bits per second (bps)=
    11·1 answer
  • To quickly jump to the last cell in a worksheet press ____.
    15·1 answer
  • Write a program segment that simulates flipping a coin 25 times by generating and displaying 25 random integers, each of which i
    5·1 answer
  • As a project manager, why is analysis an important aspect of the job?
    10·1 answer
  • What menu and grouping commands is the "SORT" tool? ( please answering meeeee)
    9·1 answer
  • In the Business world people are often measured by their???
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!