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]
3 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]3 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
Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo
dolphi86 [110]

Answer:

The function in C++ is as follows

int chkInd(string str1, string str2){    

int lenstr1=0;

while(str1[lenstr1] != '\0'){  lenstr1++;  }

int index = 0; int retIndex=0;

for(int i=lenstr1-1;i>=0; i--){

   while (str2[index] != '\0'){

       if (str1[i] == str2[index]){

           retIndex=1;

           break;         }

       else{   retIndex=0;      }

  index++;    }

  if (retIndex == 0){   return i;   }else{return -1;}}

}

Explanation:

This defines the function

int chkInd(string str1, string str2){    

First, the length of str1 is initialized to 0

int lenstr1=0;

The following loop then calculates the length of str1

while(str1[lenstr1] != '\0'){  lenstr1++;  }

This initializes the current index and the returned index to 0

int index = 0; int retIndex=0;

This iterates through str1

for(int i=lenstr1-1;i>=0; i--){

This loop is repeated while there are characters in str2

   while (str2[index] != '\0'){

If current element of str2 and str1 are the same

       if (str1[i] == str2[index]){

Set the returned index to 1

           retIndex=1;

Then exit the loop

           break;         }

If otherwise, set the returned index to 0

       else{   retIndex=0;      }

Increase index by 1

  index++;    }

This returns the calculated returned index; if no matching is found, it returns -1

  if (retIndex == 0){   return i;   }else{return -1;}}

}

4 0
3 years ago
9) Which date is assigned the serial number of 1?
goldenfox [79]

9) Which date is assigned the serial number of 1?

A. January 1, 1700

B. January 1, 2000

  • C. January 1, 1900

D. January 1, 1800

7 0
2 years ago
Read 2 more answers
if you see that your bank account has had some money taken out that you did not authorize, which of the following is one action
Savatey [412]
I would go straight to the bank and have it reported along with the police.
7 0
3 years ago
A computer never gets tired or bored while working for a long time .. ​
Angelina_Jolie [31]

Answer :Computers never get tired or bored because of doing the same task continuously. They work in the same manner all the time. A computer can store large amount of information in its memory.

Explanation: it is quality which makes the user to be dependent on computer. As we all know, computer systems do repetitive tasks without any boredom, tiredness, or fatigue.

5 0
3 years ago
Between which zones and a DMZ should firewalls be placed? Choose two answers.
brilliants [131]

Answer:

Internal and External Zones

Explanation:

Demilitarized Zone (DMZ) in a network means that, we make sure the security of network at higher level as military make sure the security of their bases or zones.

In this type of network, The network of the internal organization (LAN) needs security from hackers and unauthorized users who are trying to access the resources and information from the network.

This network is divided into two major zones. A DMZ has been placed between two zones along with firewalls enhance the security of LAN Network from the networks on internet. These two zones are named as Internal and External Zone. The firewall between DMZ and External zones monitors the users from external networks on the internet who tries to access organization's network. Internal network monitors the traffic between DMZ and Internal LAN network.

4 0
3 years ago
Other questions:
  • A datagram network allows routers to drop packets whenever they need to. The probability of a router discarding a packetis p. Co
    15·1 answer
  • The ____________ is the number of rectangles an image has in a square inch.
    11·2 answers
  • 9. Name at least two types of hard drives?
    6·1 answer
  • Which of the following tends to be true of silent film acting as opposed to sound film acting?
    7·1 answer
  • . Given an initially empty stack s that accepts integers, the following operations are performed: s.push (10) s.push (20) s.push
    13·1 answer
  • Which type of chart is used to chart progress over time?
    10·1 answer
  • What connections do you see between variables and what you learned about the Input-Output-Store-Process model of a computer?
    11·1 answer
  • HELP PLZZZZZZ
    10·1 answer
  • Hyperlink is a term used to refer to the specific manner of specifying the address of a website. Write reason for true or false.
    10·1 answer
  • A network administrator has asked robin, a network engineer, to use ospf (open shortest path first) along with rip (routing info
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!