EBK STARTING OUT WITH VISUAL C#
4th Edition
ISBN: 8220106714515
Author: GADDIS
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 8, Problem 2MC
Program Description Answer
In C#, ToLower and ToUpper method are provided by char data type to convert the case of a character.
Hence, the correct answer is option “B”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Error; the string "int16_t" and "int8_t" must occur somewhere in your code.
where to put those string into he code
Here is my code:
#include <stdio.h>
typedef struct define { short mantissa; char exponent; } Float24_t;
Please explain this code:
#include <iostream>#include <cstring>using namespace std;
int main(){ char userInput[50]; cout << "Enter a word in lowercase letters: "; cin >> userInput; for (int i = 0; i <= strlen(userInput); i++) { userInput[i] = toupper(userInput[i]); } cout << userInput; return 0;}
I need to draw a flowchart for this cod
#include<iostream>
#include<string>
using namespace std;
int main(){
// For printing welcome message
cout<<"-------------------------------------------"<<endl;
cout<<"| |"<<endl;
cout<<" Welcome to barking lot dog day care center"<<endl;
cout<<"| |"<<endl;
cout<<"-------------------------------------------"<<endl;
cout<<"Please provide ID number and contact number of owner: "<<endl;
int id;
// Input details about owner
string cn;
cout<<"Owner Id: ";
cin>>id;
cout<<"Owner contact number: ";
cin>>cn;
cout<<endl;
cout<<"Please provide Dog Details"<<endl;
string dogname;
string dogbreed;
int dogage;
int dogweight;
// Input details about dog
cout<<"Dog name: ";
cin>>dogname;
//getline(cin, dogname); // If you want to input name with whitespaces, use getline
cout<<"Dog breed: ";
//getline(cin, dogbreed);…
Chapter 8 Solutions
EBK STARTING OUT WITH VISUAL C#
Ch. 8.2 - Declare a char variable named letter and assign...Ch. 8.2 - Prob. 8.2CPCh. 8.2 - Prob. 8.3CPCh. 8.2 - Write a foreach loop that displays each character...Ch. 8.2 - Write the first line of an if statement that calls...Ch. 8.2 - Write the first line of an if statement that calls...Ch. 8.2 - Write a statement that calls the char.ToUpper...Ch. 8.2 - Prob. 8.8CPCh. 8.2 - Prob. 8.9CPCh. 8.2 - Prob. 8.10CP
Ch. 8.2 - Prob. 8.11CPCh. 8.2 - A program has two string variables named vegetable...Ch. 8.2 - Prob. 8.13CPCh. 8.2 - What delimiter is used to separate data in a...Ch. 8.3 - Prob. 8.15CPCh. 8.3 - Prob. 8.16CPCh. 8.3 - Prob. 8.17CPCh. 8.3 - Prob. 8.18CPCh. 8.3 - Prob. 8.19CPCh. 8.3 - Suppose an application contains a structure named...Ch. 8.3 - Prob. 8.21CPCh. 8.3 - Prob. 8.22CPCh. 8.4 - Look at the following declaration: enum Flower {...Ch. 8.4 - Prob. 8.24CPCh. 8.4 - Prob. 8.25CPCh. 8.5 - Prob. 8.26CPCh. 8.5 - Prob. 8.27CPCh. 8.5 - Prob. 8.28CPCh. 8.5 - Prob. 8.29CPCh. 8.5 - Prob. 8.30CPCh. 8 - In C#, __________ are enclosed in single quotation...Ch. 8 - Prob. 2MCCh. 8 - Prob. 3MCCh. 8 - Prob. 4MCCh. 8 - Prob. 5MCCh. 8 - Prob. 6MCCh. 8 - __________ are spaces that appear at the beginning...Ch. 8 - Prob. 8MCCh. 8 - Prob. 9MCCh. 8 - Prob. 10MCCh. 8 - Prob. 11MCCh. 8 - The __________ file format is commonly used to...Ch. 8 - A __________ is a data type you can create that...Ch. 8 - Prob. 14MCCh. 8 - Prob. 15MCCh. 8 - When you create a(n) __________, you specify a set...Ch. 8 - Prob. 17MCCh. 8 - Prob. 18MCCh. 8 - Prob. 1TFCh. 8 - Prob. 2TFCh. 8 - Prob. 3TFCh. 8 - Prob. 4TFCh. 8 - Prob. 5TFCh. 8 - Structure objects can be passed into a method only...Ch. 8 - Prob. 7TFCh. 8 - Prob. 8TFCh. 8 - An enum declaration can only appear inside the...Ch. 8 - The integer values that you assign to enumerators...Ch. 8 - You can compare enumerators and enum variables...Ch. 8 - Prob. 12TFCh. 8 - What method can be used to convert a char variable...Ch. 8 - List the method you would use to determine whether...Ch. 8 - Prob. 3SACh. 8 - Briefly describe each of the following string...Ch. 8 - Prob. 5SACh. 8 - Prob. 6SACh. 8 - Assume an application contains a structure named...Ch. 8 - Can enumerators be used in a loop to step through...Ch. 8 - Prob. 9SACh. 8 - Prob. 10SACh. 8 - Prob. 1AWCh. 8 - Prob. 2AWCh. 8 - Look at the following structure declaration:...Ch. 8 - Declare an enumerated data type named Direction...Ch. 8 - Prob. 5AWCh. 8 - Prob. 1PPCh. 8 - Prob. 2PPCh. 8 - Sentence Capitalizer Create an application with a...Ch. 8 - Vowels and Consonants Create an application with a...Ch. 8 - Prob. 5PPCh. 8 - Prob. 6PPCh. 8 - Prob. 7PPCh. 8 - Prob. 8PPCh. 8 - Alphabetic Telephone Number Translator Many...Ch. 8 - Prob. 10PPCh. 8 - Drink Vending Machine Simulator Create an...Ch. 8 - Prob. 12PP
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
- Integer variable numYards is read from input. Type cast numYards to a double. Ex: If the input is 26, then the output is: 26.00 #include <iostream>#include <iomanip>using namespace std; int main() { int numYards; cin >> numYards; cout << fixed << setprecision(2) << /* Your code goes here */ << endl; return 0;}arrow_forward#include <iostream> #include <iomanip> #include <string> using namespace std; int main() { constdouble MONSTERA_PRICE =11.50; constdouble PHILODENDRON_PRICE =13.75; constdouble HOYA_PRICE =10.99; constint MAX_POTS =20; constdouble POINTS_PER_DOLLAR =1.0/0.75; char plantType; int quantity; double totalAmount =0.0; int totalPoints =0; int availablePots =0; double plantPrice =0.0; cout << "Welcome to Tom's Plant Shop!" << endl; cout << "******************************" << endl; cout << "Enter your full name: "; string fullName; getline(cin, fullName); output: compiling code... Welcome to Tom's Plant Shop!----------------------------------------Enter your full name: ______ Available plants:M - Monstera ($ 11.5)P - Philodendron ($13.75)H - Hoya ($10.99)Q - Quit shoppingEnter the plant type (M/P/H/Q): ________ Part 1 Tom has recently started a plant-selling business, and he offers three different types of plants, namely Monstera,…arrow_forwardMy code #include <iostream>using namespace std;int main (){ float meal_cost,total_bill,tax_amount,tip_amount; cout <<"Enter a meal charge:"; cin >> meal_cost; tax_amount = 0.0675 * meal_cost; tip_amount = 0.2 * (tax_amount + meal_cost); total_bill = meal_cost + tax_amount + tip_amount; cout <<"The meal cost is"<< meal_cost <<endl; cout <<"tax amount" << tax_amount <<endl; cout <<"tip amount" << tip_amount <<endl; cout <<"total bill" << total_bill <<endl; return 0;} Two Comment I got: 1- Although this one is one of the shortest ones I've seen, I think the readability of the code could be improved with a couple of blank lines here and there. I'm pretty sure the computer just skips them with no effect on run speed. Also, there are a couple of weirdly placed tabs for the lines "cin >> meal_cost;", and "tax_amount = 0.0675 * meal_cost;". These two lines should be…arrow_forward
- #include using namespace std; int main() { int type; double Vth, Vg, Vd, Vs; cin>>type>>Vth>>Vg>>Vd>>Vs; return 0; }arrow_forwardWhat will the following code display?names = ['Jim', 'Jill', 'John', 'Jasmine']if 'Jasmine' not in names:print('Cannot find Jasmine.')else:print("Jasmine's family:")print(names)arrow_forwardint main() { int i, salary[10], range[9]={0, 0, 0, 0, 0, 0, 0, 0, 0}; double gross[10], total[10]; string amount[9]={"$200 - $299", "$300 - $399", "$400 - $499", "$500 - $599", "$600 - $699", "$700 - $799", "$800 - $899", "$900 - $999", "$1000 and over"}; for (i=0; i<10; i++){ cout<<"Please enter gross sales of salespeople "<<i+1<<": "; cin>>gross[i]; total[i]=200+(gross[i]*0.09); salary[i]=total[i]; if (salary[i]>=200 && salary[i]<=299) range[0]=range[0]+1; else if (salary[i]>=300 && salary[i]<=399) range[1]=range[1]+1; else if (salary[i]>=400 && salary[i]<=499) range[2]=range[2]+1; else if (salary[i]>=500 && salary[i]<=599) range[3]=range[3]+1; else if (salary[i]>=600 && salary[i]<=699) range[4]=range[4]+1; else if (salary[i]>=700 && salary[i]<=799) range[5]=range[5]+1; else if (salary[i]>=800 && salary[i]<=899) range[6]=range[6]+1; else if (salary[i]>=900…arrow_forward
- Integer variable numMinutes is read from input. Type cast numMinutes to a double. Ex: If the input is 90, then the output is: 90.00 #include <iostream>#include <iomanip>using namespace std; int main() { int numMinutes; cin >> numMinutes; cout << fixed << setprecision(2) << /* Your code goes here */ << endl; return 0;}arrow_forward// EmployeeBonus.cpp - This program calculates an employee's yearly bonus. #include <iostream> #include <string> using namespace std; int main() { // Declare and initialize variables here string employeeFirstName; string employeeLastName; double numTransactions; double numShifts; double dollarValue; double score; double bonus; const double BONUS_1 = 50.00; const double BONUS_2 = 75.00; const double BONUS_3 = 100.00; const double BONUS_4 = 200.00; // This is the work done in the housekeeping() function cout << "Enter employee's first name: "; cin >> employeeFirstName; cout << "Enter employee's last name: "; cin >> employeeLastName; cout << "Enter number of shifts: "; cin >> numShifts; cout << "Enter number of transactions: "; cin >> numTransactions; cout << "Enter dollar value of transactions: "; cin >> dollarValue; // This is…arrow_forward// EmployeeBonus.cpp - This program calculates an employee's yearly bonus. #include <iostream> #include <string> using namespace std; int main() { // Declare and initialize variables here string employeeFirstName; string employeeLastName; double numTransactions; double numShifts; double dollarValue; double score; double bonus; const double BONUS_1 = 50.00; const double BONUS_2 = 75.00; const double BONUS_3 = 100.00; const double BONUS_4 = 200.00; // This is the work done in the housekeeping() function cout << "Enter employee's first name: Kim"; cin >> employeeFirstName; cout << "Enter employee's last name: Smith"; cin >> employeeLastName; cout << "Enter number of shifts: 25"; cin >> numShifts; cout << "Enter number of transactions: 75"; cin >> numTransactions; cout << "Enter dollar value of transactions: 40000.00"; cin >> dollarValue; // This is the work done in the detailLoop()function // Write your code here…arrow_forward
- The last part of this code I need the "cans" to be a whole number. I don't know how to change it What I have right now below: #include <iostream>#include <cmath> // Note: Needed for math functions in part(3)#include <iomanip> // For setprecisionusing namespace std; int main(){double wallHeight;double wallWidth;double wallArea; cout << "Enter wall height (feet):" << endl;cin >> wallHeight; // FIXME (1): Prompt user to input wall's widthcout << "Enter wall width (feet):" << endl;cin >> wallWidth; // Calculate and output wall areawallArea = wallHeight * wallWidth; // FIXME (1): Calculate the wall's area cout << fixed << setprecision(2) << "Wall area: " << wallArea<< " square feet" << endl;// FIXME (1): Finish the output statement // FIXME (2): Calculate and output the amount of paint in gallons needed to//paint the wallcout << fixed << setprecision(2) << "Paint needed: " <<…arrow_forwardThe following code intends to input a user’s first name, last name, and age.However, it has an error. Fix the code.string fullName;int age;cout << "Enter your first and last name." << endl;cin >> fullName;cout << "Enter your age." << endl;cin >> age;cout << "You are " << age << " years old, " << fullName << endl;arrow_forward(Python) To cast a String, called data, to a integar, you use which of the following: int(data) data.int() Integer(data) new int(data)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,
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,