Computers and Technology

Code example 2-1 1. var myage, newage; 2. myage = prompt("how old are you? "); 3. myage = parseint(myage); 4. newage = 18 - myage; 5. alert("you will be eligible to vote in " + newage + " years"); (refer to code example 2-1) what type of data is stored in myage after line 2 is executed?

answer
Answers: 2

Similar questions

Предмет
Computers and Technology, 16.09.2019 20:00, ptonygonzalez701
Extra give good ! when comparing the comparison operator “equal” to the java assignment operator, what is the main difference? the comparison operator is == and the java assignment operator is =. the comparison operator is = and the java assignment operator is ==. the comparison operator is =+ and the java assignment operator is =. the comparison operator is = and the java assignment operator is =+. which term best represents the set of rules that govern the use of words and punctuation in a language? order of operations variable syntax code you are declaring a variable that will store text. which data type could be used for the new variable? choose the best answer. boolean string int real analyze the following code, which is correct for a conditional operator? (myage> =yourage)? myage-yourage: yourage-myage (myage> =yourage): myage-yourage: yourage-myage (myage> =yourage)? myage-yourage? yourage-myage (myage> =yourage); myage-yourage; yourage-myage which of the following characters is not allowed for java variable names? backslash dollar sign capital a underscore you purchase moving boxes and mark them with labels to indicate the contents they will store. which action describes the labeling of the boxes? declaring variables allocating memory writing a program compiling code which of the following symbols would not be seen in the syntax for java variables, methods, or arguments? {} () ? ? [] which comparison operator is used for “not equal to”? ! = %= #= *= why would you not use a char to store the phrase “super100”? a char only stores uppercase letters from a to z. a char only stores lowercase letters from a to z. a char only stores one letter, number, or symbol. a char only stores uppercase and lowercase letters. what does the boolean data type store? 0s or 1s letters numbers colors you are writing a payroll program in java that needs to assign the value of 25 percent as a tax rate. which statement represents the best construct of this assignment? int taxrate == 0.25; float taxrate = 0.25; float taxrate ! = 0.25; long taxrate = 25; you are writing a program that needs to calculate gross pay for an employee based on variables grosspay, payrate, and hrsworked. which statement represents the best construct of this assignment? grosspay = payrate – hrsworked; grosspay = payrate / hrsworked; grosspay = payrate – hrsworked; grosspay = hrsworked * payrate; which operation comes before d in pemdmas? modulus multiplication addition subtraction which java syntax describes the mathematical expression “3 is not equal to 9”? 3< > 9 3! =9 3==9 3 not=9 which data type can be used to store decimal numbers in java? short byte float int
Answers: 1
Do you know the correct answer?
Code example 2-1 1. var myage, newage; 2. myage = prompt("how old are you? "); 3. myage = parseint...

Questions in other subjects:

Konu
Mathematics, 11.04.2020 16:41