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
mash [69]
3 years ago
6

If you wanted to divide an integer variable by 2, which of the following lines of code would you use? total = int + 2 total = in

t * N total int / 2 total = int. 2
​

Computers and Technology
1 answer:
Lesechka [4]3 years ago
8 0

Answer:

Yes

Explanation:

Because all answers are intotal (2)

You might be interested in
What is one effective way for employees to keep their skill-sets current
natta225 [31]
Is it a multiple choice answer? if so would like to see the answers as there are TONS of effective ways and if i list one it may not be in that list you have if its multiple choice.
3 0
3 years ago
Help me please big test
4vir4ik [10]

Answer:

keyboard I think. sorry if I'm wrong

5 0
3 years ago
Write c++ an algorithm to write a program to sort two numbers ascending or descending order​
In-s [12.5K]

Answer:

++ provides versions of these algorithms in the namespace std::ranges. Algorithms are the vast topic that covers topics from searching, sorting to min/max heaps. These can be categorized as:

Explanation of C++ Algorithm

Explanation:

4 0
3 years ago
Write a program that simulates flipping a coin to make decisions. The input is how many decisions are needed, and the output is
Travka [436]

Answer:

Here is the JAVA program:

import java.util.Scanner;  // to get input from user

import java.util.Random;   // to generate random numbers

public class CoinFlip {  

// function for flipping a coin to make decisions

  public static String HeadsOrTails(Random rand) {

//function to return head or tail

     String flip;   // string type variable flip to return one of the heads or tails

     if ((rand.nextInt() % 2) == 0)  

// if next random generated value's mod with 2 is equal to 0

        {flip = "heads";}  // sets the value of flip to heads

     else   // when the IF condition is false

       { flip = "tails";}   // sets value of flip to tails

  return flip;    }    //return the value of flip which is one of either heads or tails

  public static void main(String[] args) {  //start of main function body

     Scanner rand= new Scanner(System.in);  // creates Scanner instance

// creates random object and seeds the program with value of 2

     Random no_gen = new Random(2);  

     int decision = rand.nextInt();   //calls nextInt() to take number of decisions

     for (int i = 0; i < decision; i++) {

// produces heads or tails output for the number of decisions needed

        System.out.println(HeadsOrTails(no_gen));       }    }    }

//prints heads or tails

Explanation:

The above program has method HeadsOrTails(Random rand) to return the heads or tails based on the condition if ((rand.nextInt() % 2) == 0) . Here nextInt() is obtains next random number from the sequence of random number generator and take the modulus of that integer value with 2. If the result of modulus is 0 then the value of flip is set to heads otherwise tails.

In the main() function, a random object is created and unique seed 2 is set. The decision variable gets the number of decisions. In the for loop the loop variable i is initialized to 0. The loop body continues to execute until the value of i exceeds the number of decisions needed. The loop body calls the HeadsOrTails(Random rand) method in order to output either heads or tails.

The program and output is attached in a screenshot.

5 0
3 years ago
How do keystroke dynamics determine whether to authenticate an individual or not?
inysia [295]
<span>Keystroke dynamics determine whether to authenticate an individual or not w</span>ith dwell and flight time.  <span>Dwell time (the time a key pressed) and Flight time (the time between "key up" and the next "key down") . These keystroke dynamics prevent online fraud.</span>
5 0
3 years ago
Other questions:
  • How to install specific microsoft office 2016 aoos
    15·1 answer
  • Why is ipsec considered to be a transparent security protocol?
    6·1 answer
  • In a case where electrical current leakage from the circuit occurs, the GFCI would do the following:
    10·1 answer
  • Which of the following are examples of structured data?
    15·1 answer
  • While saving her word-processed academic documents, Ashley includes the subject, title, and the author's name in the properties.
    7·1 answer
  • PLEASE HELP FAST
    5·1 answer
  • This is for career exploration, I need help please! &lt;3 HELPPPP
    8·2 answers
  • What is the advantage of using a translation look-aside buffer (TLB), also called associative memory, in the logical-physical ad
    15·1 answer
  • Which requires large computer memory?
    15·1 answer
  • Let us begin
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!