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]
3 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]3 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
________ are small files that browsers store on users' computers when they visit web sites.
Mila [183]
Downloads? It sounds like that might be the answer. Idk.
4 0
3 years ago
Given a high-level code you should be able to write the corresponding MIPS assembly code. Simple loop in C; A[ ] is an array of
nevsk [136]

Answer:

Explanation:

The code for the given problem is written below

.data

A : .word 1 2 3 4 5 6 7 8 9 10

.text

la $s5,A

li $s1,0 # load g

li $s2,10 # load h

li $s3,0 # load i

li $s4,1 # load j

loop:

mul $s6,$s3,4

add $s6,$s6,$s5 #address of A[i]

lw $s6,($s6) #get value of A[i] in s3

add $s1,$s1,$s6 #g = g+A[i]

add $s3,$s3,$s4 # i = i+j

bne $s3,$s2,loop #if i!=h jump to loop

4 0
2 years ago
A person who is good with numbers and problem solving has which type of learning preference?
ohaa [14]

Answer:

I believe it is logical.

6 0
2 years ago
Read 2 more answers
HELP ASAP!!!
wolverine [178]
The answer on this scenario is B.home. It is the tab being used then in order to have slide layouts, fonts for the formatting and adding images. Also the change in font color can be done. Hope this would be of help.
6 0
3 years ago
What does ACCU stand for?
saveliy_v [14]
Association of C and C++ Users (ACCU) is a worldwide association of people who are interested in C, C++, and related programming languages.
3 0
2 years ago
Read 2 more answers
Other questions:
  • What were the first microblogs known as
    12·2 answers
  • Which type of multiplexing divides transmission opportunities into slots of 125 microseconds with position inside each slot rese
    10·1 answer
  • When a customer makes a request or complaint, the goal of customer service is to
    5·1 answer
  • Assignment 2: Room area
    14·1 answer
  • What is your favorite food
    11·2 answers
  • Who was the first president
    6·2 answers
  • You were recently hired by a small start-up company. The company is in a small office and has several remote employees. You have
    15·1 answer
  • Given a line of text as input, output the number of characters excluding spaces, periods, or commas. If the input is:
    12·1 answer
  • Jennifer turns on her laptop and hears a series of beeps. What do they probably indicate?.
    15·1 answer
  • please help, touch pad and trackpad are the same thing and the other answers don’t really make sense to me..
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!