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
Ne4ueva [31]
4 years ago
8

Assume the variable date has been set to a string value of the form mm/dd/yyyy, for example 09/08/2010. (Actual numbers would ap

pear in the string.) Write a statement to assign to a variable named dayStr the characters in date that contain the day. Then set a variable day to the integer value corresponding to the two digits in dayStr.
Computers and Technology
1 answer:
bonufazy [111]4 years ago
6 0

Answer:

String date = "21/05/2020";

String dayStr = date.substring(0,2);

int day = Integer.parseInt(dayStr);

System.out.println(day);

Explanation:

Create a variable called <em>date</em> which holds the current date

Create a variable called <em>dayStr</em>. Initialize it to the day part of the <em>date</em> using the substring method

Create a variable called <em>day</em>. Parse the <em>dayStr</em> and assign it to the <em>day</em>

Print the <em>day</em>

You might be interested in
What is the use of html in websites
Alborosie
HTML is a very basic markup language and requires memorization of a few dozen HTML commands that structure the look and layout of a web page. Before writing <span>any HTML code or designing your first web page, you must decide on an HTML editor or text editor, such as Notepad or Word Pad.</span>
4 0
3 years ago
Read 2 more answers
I just downloaded an update for my laptop. Now, it doesn't give me a notification when the battery is low, and it just shuts off
givi [52]
Have you tried resetting it on your own first ? Although, it could just be a bug from this update (being something you can't solve until the next one) But you can try resetting it, or going to settings and clicking on battey, maybe the update turned that off ? Sometimes they do that, too! I hope all is well. ((:
7 0
3 years ago
Computer ForensicsThere are many differences between public-sector and private-sector computer investigations. What do you see a
elena55 [62]

Answer:

For a private computer investigation into cyber crime the private sector  should complete all its courses and must be certified by the relevant authorities and must also be an expert in the computer investigations. while

Public computer investigations has more aspects that involves non-certified personnel's

The private-sector computer investigations are used mostly on all the cyber crimes and hacking and loss of business data.while public-sector computer investigations are used on crimes like rapes, accidents and murders crimes

Explanation:

Computer forensics are used to resolve crimes like cyber crime, hacking, malfunctions and data interrupts.

Before a private computer investigations which is into cyber crime investigation can continue, the private sector  should complete all its courses and must be certified by the relevant authorities and must also be an expert in the computer investigations. while

Public computer investigations has more aspects that involves non-certified personnel's and the personnel's are not necessarily supposed to complete the courses

The private-sector computer investigations are used mostly on all the cyber crimes and hacking and loss of business data.while public-sector computer investigations are used on crimes like rapes, accidents and murders crimes

5 0
4 years ago
Array Challenge Have the function ArrayChallenge (arr) take the array of numbers stored in arr and return the string true if any
vampirchik [111]

Answer:

The code is given as follows,

Explanation:

Code:

#include <stdio.h>

#include <string.h>  

int n; //to store size of array  

char* ArrayChallenge(int arr[]) //function returns string true or false

{

  int i, j;

  int sum = 0;

  for(i = 0; i < n; i++)

  {

      sum = sum + arr[i]; //count sum

  }  

  for(i = 0; i < n; i++)

  {

      for(j = i+1; j < n; j++) //loop for every two elements in array

      {

          if(arr[i]*arr[j] > 2*sum) //check if proudct of two elements > 2 times sum

          {

              printf("\n%d x %d = %d, 2xSum = %d\n", arr[i], arr[j], arr[i]*arr[j], 2*sum);

              return "true"; //If proudct of two elements > 2 times sum. return true

          }

      }

  }

  return "false"; // If proudct of two elements < 2 times sum. return false

}  

int main()

{  

  printf("\nEnter size of array: ");

  scanf("%d", &n); //read size of array

  int A[n]; //array of size n

  printf("\nEnter array elements: ");

  int i;

  for(i = 0; i < n; i++)

  {

      scanf("%d", &A[i]); //read array from stdin

  }

  printf("%s\n",ArrayChallenge(A)); //ccall function and print answer

 

  return 0;

}

6 0
3 years ago
Is a device connected to a sound card in the system.
SSSSS [86.1K]

Answer:

Yes

Explanation:

A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under control of computer programs. The term sound card is also applied to external audio interfaces used for professional audio applications.

8 0
3 years ago
Other questions:
  • Which of the following best describes the purpose of child labor laws?
    13·2 answers
  • What file may contain data written to it in case of an unexpected error or program shut-down?
    12·2 answers
  • In programming, what is a string?
    8·2 answers
  • ________ computers are specially designed computer chips that reside inside other devices such as your car or the electronic the
    9·1 answer
  • If a laptop is getting no power while plugged in, which hardware part often needs to be replaced?
    5·1 answer
  • Which method of traversing a tree would result in a sorted list for a binary search tree?
    11·1 answer
  • PLEASE HELP ASAP!!! 50 POINTS FOR TWO DIGITAL TECHNOLOGY MULTIPLE CHOICE QUESTIONS!!!
    13·1 answer
  • What is a . com in a web address mean<br>​
    10·2 answers
  • Guys, if I'm going back to 505 and it's a 7-hour flight or a 45-minute drive how do I get to 505?
    12·1 answer
  • A.1111+1011. b. 10111+11111 c. 1111*1011 d. 1110*1101 perform the binary calculations.​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!