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
Art [367]
3 years ago
12

How is a network address of 192.168.6.0 and a subnet mask of 255.255.254.0 written in cidr?

Computers and Technology
1 answer:
ZanzabumX [31]3 years ago
6 0
It can be written with

192.168.6.0/23

255.255.0.0 means  /16 which is class b subnet mask so as 254 is in the third octet which means /23 so you can write it as /23.
You might be interested in
E-mails that are mailed directly to a consumer without their knowledge or permission are called
gizmo_the_mogwai [7]
E-mails that are mailed directly to a consumer without knowledge or permission are called spam
6 0
3 years ago
Read 2 more answers
Write a program that prompts the user to enter positive integers (as many as the user enters) from standard input and prints out
julia-pushkina [17]

Answer:

Here is the JAVA program that prompts the user to enter positive integers from standard input and prints out the maximum and minimum values:

import java.util.*;

public class Ex0603 {

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

   Scanner in = new Scanner(System.in); //creates Scanner class object to take input from user

   int minimum = 0; //stores the minimum of the integers

   int maximum = 0; //stores the minimum of the integers

   int num; //stores the positive integer values

   System.out.println("enter a positive integer: ");//prompts user to enter a positive integer

   num = in.nextInt();//scans and reads the input integer value from user

   minimum = num;  //assigns value of num to minimum

   while(true) {//while loop keeps prompting user to enter a positive integer

       System.out.println("enter a positive integer: ");//prompts user to enter a positive integer

       num = in.nextInt();//scans and reads the input integer value from user

       if(num <=0)//if the user inputs a negative integer or 0

           break; //breaks the loop

       if (num > maximum) {//if the value of positive integer is greater than the maximum of value

           maximum = num; } //assigns that maximum value of num to maximum variable

       if (num < minimum) {//if the value of positive integer is less than the minimum of value

           minimum = num; //assigns that minimum value of num to minimum       }    }            

   System.out.println("The maximum integer is : " + maximum); //displays the maximum of the positive integers

   System.out.println("The minimum integer is : " + minimum); }}   //displays the minimum of the positive integers

Explanation:

Here is the JAVA program that that prompts the user to enter an integer N, then reads N double values, and prints their mean (average value) and sample standard deviation:

import java.util.*;  

public class Ex0603 {  

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

Scanner in = new Scanner(System.in);  //creates Scanner class object to take input from user

double integer= 0;  //to store the number of input values

double sum = 0;  //to store the sum of input numbers

double mean = 0;  //to store the average of numbers

double sd = 0;  //to store the standard deviation result

double variance = 0;  //to store the variance result

double sumSquare = 0;  //to store the sum of (num-mean)^2

int n = 0;  //to store the sample size N

   System.out.println("Enter an integer: ");  //prompts user to enter an integer that is how many elements user wants to input

   integer = in.nextInt();  //reads the value of integer from user

   double size=integer; // declares a double type variable and assigns value of int type variable integer to this double type variable size

   int i=0;  //used to point each element of the num array

   double num[] = new double[(int)size];  //declares an array to hold the numbers input by user

   while(integer>0){  //loop executes until value of integer is greater than 0

   System.out.println("Enter a number: "); // prompts to enter a number

   num[i] = in.nextDouble(); //reads double values

   sum += num[i];  //adds the values stored in num array

   i++;  //increments i to point to the next element in num array

   n++;  //increments n to count the total number of elements

  integer--; //decrements integer value at each iteration

   mean = sum / n;    }  //compute the average of values

   i=0;  

    while(size>0){  //loop executes until value of size exceeds 0

       sumSquare += Math.pow(num[i]-mean,2); //takes the sum of square difference between each element of num array and value of mean

       i++; //increments i

      size--;   }  //decrements size

variance = sumSquare / (n-1);  //compute variance by dividing the result of sum of the squares of their differences from the mean by n-1

   sd = Math.sqrt(variance);  //computes standard deviation by using sqrt function which takes the sqrt of the result of variance computed above

System.out.println("Average value is: " + mean+ " and the standard deviation is " + String. format("%.2f", sd));   }} //displays the average of numbers stored in mean variable and value of standard deviation is displayed up to 2 decimal places

Screenshots of both programs and their outputs is attached.

7 0
3 years ago
What is the name of the fifth Sims 3 expansion pack
olga2289 [7]
2 were released as part 5 for the Sims 3 Expansion Pack Series. These two packs were the Pets Expansion and the Master Suite pack which added buyable and ownable pets and hotels.
8 0
3 years ago
Variance for accumulator. Validate that the following code, which adds the
Art [367]

Using the knowledge of computational language in JAVA it is possible to write a code that Validate that the following code, which adds the methods var() and stddev() to Accumulator, computes both the mean and variance of the numbers presented as arguments to addDataValue()

<h3>Writting the code:</h3>

<em>import java.util.*;</em>

<em>public class </em><em>Accumulator </em><em>{  </em>

<em>private static double m;   </em>

<em>private static double v;   </em>

<em>private static double st;   </em>

<em>private static  double s[]=new double[5]; </em>

<em>private static int N;</em>

<em>private static int count =0;</em>

<em>public static void main(String[] args) {</em>

<em>// TODO Auto-</em><em>generated </em><em>method stub</em>

<em>Random r = new Random();</em>

<em>System.out.println("hello world");</em>

<em>for(int i=0;i<5;i++) {</em>

<em>    double randomvalue = r.nextDouble();</em>

<em>addDataValue(randomvalue);</em>

<em>}</em>

<em>for(int i=0;i<s.length;i++) {</em>

<em>    System.out.println("dataValue:"+s[i]);</em>

<em>}   </em>

<em>mean();</em>

<em>System.out.println("mean:"+m);</em>

<em>var();</em>

<em>System.out.println("variance:"+v);</em>

<em>stddev();</em>

<em>System.out.println("standard deviation:"+st);</em>

<em>}</em>

<em>public  static void </em><em>addDataValue</em><em>(double value) {     // addes data values to array</em>

<em>  s[count]=value;</em>

<em>  count++;</em>

<em> }</em>

<em>public static double mean() {        // returns mean</em>

<em>double sum=0.0;</em>

<em>for(int i=0;i<s.length;i++) {</em>

<em>    sum+=s[i];</em>

<em>}</em>

<em>m = sum/s.length;</em>

<em> return m;</em>

<em>}   </em>

<em>public </em><em>static </em><em>double var() {    //returns variance</em>

<em>double mm = mean();</em>

<em>     double t = 0;</em>

<em>     for(int i=0;i<s.length;i++) {</em>

<em>         t+= (s[i]-mm)*(s[i]-mm);</em>

<em>} </em>

<em>     v= t/(s.length-1);</em>

<em>      return v;  </em>

<em>}</em>

<em>public static  double </em><em>stddev</em><em>() {        // returnsn the stardard deviation </em>

<em>st= Math.sqrt(var());</em>

<em>return st;</em>

<em>}</em>

<em>}</em>

See more about JAVA at brainly.com/question/12975450

#SPJ1

3 0
1 year ago
This variable controls the number of times that the loop iterates. A. Counter variable B. Loop control variable C. Running total
Norma-Jean [14]

Answer:

B) Loop control Variable

Explanation:

When programming, A loop control variable is used to control the number of iterations for a program loop. By convention programmers love to call this variable counter, i, j, n etc. The control variable when defined will determine the number of times a loop will execute. See the example bellow in C++ where we use a for loop to print the word "Hello" 5 times

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>int main()</em>

<em>{</em>

<em>  for(int counter = 0; counter<5; counter++){</em>

<em>    cout<<"Hello"<<endl;</em>

<em>  }</em>

<em>    return 0;</em>

<em>}</em>

In this code snippet, the control variable is called counter and the condition is that counter will run from 0 to 4. So we get the world Hello printed five times

8 0
3 years ago
Other questions:
  • To extend the bottom border of a hyperlink across the complete width of a navigation list, change the ____ property of each hype
    9·1 answer
  • The ____ provides access to the Internet may also be internal.
    14·2 answers
  • A program is a high-level one that has been converted to machine language
    15·1 answer
  • In graphical linear programming to maximize profit, the objective function is: I. a family of parallel lines. II. a family of is
    11·1 answer
  • PLEASE HELP ASAP IT'S DUE TODAY! WILL GIVE BRAINLIEST, FIVE STARS, AND THANKS!! PLEASE HELP!
    12·1 answer
  • Which steps will create a new blank word document
    9·1 answer
  • What is this app for ?
    10·2 answers
  • Select the correct answer from each drop-down menu.
    6·1 answer
  • Suppose a switch is built using a computer work station and that it can forward packets at a rate of 500,000 packets per second,
    11·1 answer
  • One rule in the Java programming language is that you have to place a semicolon at the end of each statement. What is this rule
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!