Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 2, Problem 15RQ
Assume that you have declared a variable as double hourly = 13.00;.What will the statement WriteLine(hourly); display?
a. 13
b. 13.0
c. 13.00
d. 13.000000
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Uk.
7. How would you declare a variable storing a person's name?
String name = Jeff;
String name = "Jeff";
name String = "Jeff";
string name = "Jeff";
8. These characters mark the beginning of a single-line comment.
/**
//
/*/
*/
9. Variable names can't start with a number.
True
False
For the following code:
for ( a = 1, b = 5, c = 3; a < 4; a++, b++ )
{
c = a * b + c;
}
Indicate what values for the following variable will be when the code endsa=b=c=
Chapter 2 Solutions
Microsoft Visual C#
Ch. 2 - Prob. 1RQCh. 2 - Prob. 2RQCh. 2 - Prob. 3RQCh. 2 - Assume that you have two variables declared as int...Ch. 2 - Assume that you have a variable declared as...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...Ch. 2 - Prob. 8RQCh. 2 - Assume that you have a variable declared as int...Ch. 2 - Assume that you have a variable declared as int...
Ch. 2 - Prob. 11RQCh. 2 - Which of the following is not a C# comparison...Ch. 2 - Prob. 13RQCh. 2 - Which of the following C# types cannot contain...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - Assume that you have declared a variable as double...Ch. 2 - When you perform arithmetic operations with...Ch. 2 - Prob. 18RQCh. 2 - Prob. 19RQCh. 2 - Which of the following compares two string...Ch. 2 - What is the numeric value of each of the following...Ch. 2 - What is the value of each of the following Boolean...Ch. 2 - Choose the best data type for each of the...Ch. 2 - In this chapter, you learned that although a...Ch. 2 - Write a C# program named InchesTOCentmeters that...Ch. 2 - Prob. 6ECh. 2 - Write a C# program named ProjectedRaises that...Ch. 2 - Convert the ProjectedRaises class to an...Ch. 2 - Malcolm Movers charges a base rate of $200 per...Ch. 2 - Prob. 10ECh. 2 - Write a program named Eggs that declares four...Ch. 2 - Modify the Eggs program to create a new one named...Ch. 2 - Write a program named MakeChange that calculates...Ch. 2 - Write a program named Testslnteractive that...Ch. 2 - Write a program named FahrenheitToCelsius that...Ch. 2 - Prob. 16ECh. 2 - Prob. 17ECh. 2 - Pig Latin is a nonsense language. To create a word...Ch. 2 - Each of the following files in the Chapter.02...Ch. 2 - In Chapter 1, you created two programs to display...Ch. 2 - Prob. 2CP
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- .. Create a VB.NET Console Application that does the following: Create a variable of Integer data ... type, called marks; Create a variable of String data type, called grade; Assign the user input ... to marks; Convert marks into grade as follows using the Select-Case statementarrow_forwardprintTodaysDate is a function that accepts no parameters and returns no value. Write a statement that calls printTodaysDate.arrow_forwardAssume that grade is a variable whose value is a letter student_grade-- any one of the following letters: 'A', 'B', 'C', 'D', 'F". Assume further that there are the following int variables, declared and already initialized: acount, bcount, ccount, dcount, fcount. Write a switch statement that increments the appropriate variable (acount, bcount, ccount, etc.) depending on the value of grade. So if grade is 'A' then acount is incremented; if grade is'B' then bcount is incremented, and so on.arrow_forward
- Assume that you have a variable declared as int var1=3;. If var2=var1++, what is the value of var2? 2 3 4 5arrow_forwardAssume that you have a variable declared as int varl=3;. What is the value of 22% var1? 21 7 1 0arrow_forwardOptional parameters are represented with the following character: a. > b. = c. * d. ! e. ?arrow_forward
- o assign a double variable d to an int variable x, you write ____. x = d; x = (double) d; x = (int) d; d = x;arrow_forwardOne way to make sure that a variable has been assigned a value is to __________ the variable with a value when you declare it. a. concatenate b. initialize c. delimit d. restrictarrow_forwarda- double my_num = 100.0; b- int $my_num = '10000'; int myNum = 1000; d- int mynum1 = 100000; 4) Which one is NOT a valid variable declaration? c-arrow_forward
- ,arrow_forwardLanguage is VB Write a selection statement (if .....then .... else .... end-if) that evaluates a voter age to allow her/him to vote. If age is equal or greater than 18 then display the message 'you can vote.' ,otherwise display "you are too young to vote" on a label control or object . You pick the name for the integer variable whose content is the number indicating the age and pick a name for the label whose content indicating the appropriate message. if ........ then ............. else .......... end-ifarrow_forward1- Which of the following code displays the area of a circle if the radius is positive?if (radius >= 0) System.out.println(radius * radius * 3.14159);if (radius <= 0) System.out.println(radius * radius * 3.14159);if (radius > 0) System.out.println(radius * radius * 3.14159);if (radius != 0) System.out.println(radius * radius * 3.14159); 2- Analyze the following code: // Enter an integerScanner input = new Scanner(System.in);int number = input.nextInt(); if (number <= 0)System.out.println(number); System.out.println(number); must be placed inside braces { and }. The if statement is wrong, because it does not have the else clause. The user cannot enter a negative number. If t he user enter a number grater than zero or equal to zero, then the number is displayed. 3- Suppose x = 0, y = -1, and z = 1. What is the printout of the following statement? if (x > 0)if (y > 0)System.out.println("x > 0 and y > 0");else if (z > 0)System.out.println("x < 0 and z…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Programming with Microsoft Visual Basic 2017Computer ScienceISBN:9781337102124Author:Diane ZakPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Expressions in C++ | C++ tutorial for beginners; Author: Tutorial Mart;https://www.youtube.com/watch?v=XHbsZGpmRc8;License: Standard YouTube License, CC-BY
expression in python # python expressions; Author: Abhishek Tripathi;https://www.youtube.com/watch?v=Cc-kJGRjH6k;License: Standard Youtube License