The char data type provides the __________ for converting the case of a character. a. Lowercase and Uppercase methods b. ToLower and ToUpper methods c. IsDigit and IsLetter methods d. IsWhiteSpace and IsPunctuation methods
Q: What will the following code display? int number; number = 3.625: cout << number;
A: Given: What will the following code display? int number; number = 3.625: cout << number;
Q: The following declaration, program, and program segment has errors. Locate as many as you can.…
A:
Q: please do its main part. #include using namespace std; int calc( int x, int &three, int &five ) {…
A: Program with its main part is as follows, #include <iostream> using namespace std; int calc(…
Q: #include using namespace std; int main() { char str[20]; cin>>str; // the user writes: Hello world…
A: The answer is...
Q: How to convert all the C code to C++(stdio.h) #include using namespace std; int main() { const…
A: #include<iostream>using namespace std;int main(){ const int b=14; const float f=0.20;…
Q: use strings. string firstName; char lastName[7]; firstName - "Abraham"; // Assign a value to the…
A: string firstName; //declares a string objectchar lastName[7];…
Q: My code #include using namespace std; int main () { float…
A: The following changes can be done to make the program more readable: Include spaces between the…
Q: #include using namespace std; void car(){ { cout << "Audi R8"; int main() { car("BENZ"); return 0;…
A: It will give compile time error. as, function Car has NO arguments but during function call ONE…
Q: #include using namespace std; int main() { int specialNum; cin » specialNum; if (/put your answer…
A: specialNum == 0 || specialNum == -99 || specialNum == 44 This Expression should be filled to…
Q: C++ program Create program and prompt me to enter a dollar amount between 0 and 999.99999 as a…
A: C++ is an efficacious general-purpose programming language. It can be used to elaborate on operating…
Q: #include #include void main(void) (int number; Cout > number; if ( number > 100) cout <<" number…
A: The above program is for checking if number>100 then a message is displayed "number is greater…
Q: Function strlen() takes a string as an argument and returns the number of characters in the string,…
A: Strlen finds the length of string .
Q: Many documents use a specific format for a person's name. Write a program whose input is: firstName…
A: // Import the packageimport java.util.Scanner; // Create LabProgram Classpublic class Main{ //…
Q: #include using namespace std; const int SECS PER MIN = 60; const int SECS PER HOUR = 3600; int…
A: Required:
Q: *11.15 (Area of a convex polygon) A polygon is convex if it contains any line segments that connects…
A: Program: /**ConvexPolygon.java**/ import java.util.Scanner; public class ConvexPolygon { public…
Q: Magic Number Programming: Magic program ask user to enter three integers by the user, the three…
A: # include<stdio.h> void magic(int left, int right, int digit) // the function to generate…
Q: The last part of this code I need the gallon round to the nearest number, but it still shows wrong…
A: You should change the round function to ceil() function. Code: #include <iostream>#include…
Q: #include using namespace std; Int main() { i=10; X=--i; coutk<"x: "<<x; cout<<"i: "<<i; return 0; }
A: ANSWER: Error Explanation: An affixed assertion can't be utilized to instate factors at the hour of…
Q: (b) Show what the programmer can view from the console by inserting number 33 and number 77 for the…
A: Code: #include <iostream>using namespace std; int main ( ){int choice;int a = 33, b = 55, c =…
Q: #include using namespace std; int subtract (int x,int y, int z=2 ) { return x-y+z; } int main () {…
A: The value of x,y,z is 8,12,2 respectively in the beginning. Now the assignment operator works in…
Q: What will the following code display? int number = 6; ++number; cout << number << endl;
A: ++ number means pre increment means first increment the number and then print number =6 ++number =7…
Q: Nice Number Programming: Nice program ask user to enter three integers from keyboard (java console),…
A: Below is the required java program. Program Approach: Import necessary packages to get the standard…
Q: #include #include using namespace std; int NormalizeGrade (int grade) { const int upperBound = 76;…
A: - We need to show the result of the lines combined. - The program is in C++.
Q: In this code, which variable was overwritten by using its existing value, to get its new value by…
A: The solution to the given problem is below.
Q: int isbivisiblebye(int num) (m ) reture isDivisibleBy6( ); num eturn 13 10) return reture…
A: #include <stdio.h> int isDivisibleBy6(int num){ if(num < 6) return…
Q: Flowchart, create. #include #include using namespace std; double computeRate(int); double…
A: Here our ask is to draw a flow chart to the given program. First, let's understand the program a…
Q: I need to draw a flowchart for this cod #include #include using namespace std; int…
A: A flowchart is a graphical representation of a series of measures. It is commonly used to illustrate…
Q: Magic Number Programming: Magic program ask user to enter three integers by the user, the three…
A: # include<stdio.h> void magic_numbers(int left, int right, int digit) // the function to…
Q: Please help me debug my C++ code. My code is: //include statement(s) #include //using…
A: The following is the solution
Q: #include using namespace std; int main(){ int a = 4; int *pa = &a; *pa 8; cout << a <« endl;
A:
Q: #include #include using namespace std; int main() int x=9,z; cin>>z; z=sqrt(x); cout<<"\nthe value…
A:
Q: #include int main() { int age; printf("Enter your age:"); scanf("%d",&age); if(age >=18)…
A: The if-else statement is used to perform the operations based on some specific condition
Q: #include using namespace std; int main() // a program 11lustrating integer truncation int numl,…
A:
Q: The following declaration, program, and program segment has errors. Locate as many as you can.…
A: One may want to set a default value for the property member, and therefore when not started would…
Q: What will the following code display?names = ['Jim', 'Jill', 'John', 'Jasmine']if 'Jasmine' not in…
A:
Q: In the code get_grade_stats(scores) scores refers to its O argument O arguments O parameter
A: Function parameter & argument: Function parameters and arguments are often applied for the same…
Q: The last part of this code I need the "cans" to be a whole number. I don't know how to change it…
A: We have a program in C++ language and we have an output where Cans needed value is float and we need…
Q: #include // this line can be placed second instead of first #include // this line can be placed…
A: Explanation: The modified C++ program to calculate the expected time taken to fall from specific…
Q: SmartCare Surgery is a private clinic which is operating in the Sultanate of Oman since 2015. The…
A: we have to accept input and then check the condition whether it is X or not If it is X, we can exit…
Q: C++ main(){int i; int j; int y; i=9;j=3; y=(i/j)-(3*i^2)/9; cout<<y;}
A: #include <iostream>using namespace std; int main() { int i; int j; int y; i = 9;…
Q: Flx the errors of this code #include namespace std; int main { int a if a 10; < 20 cout << "a is…
A: Solution: Given Code:
Q: What is wrong with the following code? #include using namespace std; void displayString (string);…
A: Function displyString(string) has return type of Void and it takes a String parameter. But when…
Q: Which pair of values for a and b will t #include using namespace std; int main(void) int a,b; b
A: answer=2 a=4,b=1
Q: If you have a String named firstName, type the line of code that defines an integer named…
A: "Since you have not mention any programming language, so we will write our code in C language."…
Q: The following declaration, program, and program segment has errors. Locate as many as you can.…
A: Lets see the solution.
Q: Nhat is wrong with the following code? #include using namespace std; void displayString (string);…
A: Given: #include <iostream> using namespace std; void displayString(string) int main() {…
Q: int main() int NUMBER, BALANCE; printf("Please enter a number "); scanf("%d", &NUMBER); BALANCE =…
A: Code: #include<stdio.h> int main(){ int N,B; printf("Enter a number: "); scanf("%d…
Q: What is the output of the program? #include using namespace std; void trick (int *templ, int…
A: Please check the solution below.
Q: #include using namespace std; int main (() int a=8, b=5; float c= float (a)/float(b); cout<<"c =…
A: Answer in step2
Q: Many documents use a specific format for a person's name. Write a program whose input is: firstName…
A: This program can be done in a very easy way. Programming instruction: First, take the input from the…
The char data type provides the __________ for converting the case of a character.
a. Lowercase and Uppercase methods
b. ToLower and ToUpper methods
c. IsDigit and IsLetter methods
d. IsWhiteSpace and IsPunctuation methods
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Grade Book A teacher would like to assign a letter grade to a student, based on student's test score. Write a program to help this teacher managing her students' test score. Use the following grading scale to assign a letter grade to a student. Test Score Letter Grade 80 - 100 A 70 - 79 B 60 69 C 50 - 59 0- 49 F Your program must have an array of string objects to hold the student names and an array of int to hold the student scores. Let the teacher determines the number of students and ask the teacher to enter the information for each student. Your program should have the following programmer-defined functions: getInput () - to read the students name and scores from user getGrade () - to determine the letter grade corresponding to the score getReport () - to determine the maximum, minimum, average and standard deviation of the scores Display an error message if the teacher enter mark below 0 or above 100, and keep asking for a valid value. The program should also be capable of…2. What data type would you use to allow a function to receive an Int or nil value as its parameter? func display(num: ____ ) { if num == nil { print("Not a number") } else { print(num) } } display(num: 5) display(num: nil)data type must be initialized at the time of declaration: String O const int char array all of above None of above
- The ________ function returns no value. a) malloc() b) realloc() c) free() d) calloc()Treasure Hunter description You are in front of a cave that has treasures. The cave canrepresented in a grid which has rows numbered from 1to , and of the columns numbered from 1 to . For this problem, define (?, )is the tile that is in the -th row and -column.There is a character in each tile, which indicates the type of that tile.Tiles can be floors, walls, or treasures that are sequentially representedwith the characters '.' (period), '#' (hashmark), and '*' (asterisk). You can passfloor and treasure tiles, but can't get past wall tiles.Initially, you are in a tile (??, ). You want to visit all the treasure squares, andtake the treasure. If you visit the treasure chest, then treasurewill be instantly taken, then the tile turns into a floor.In a move, if you are in a tile (?, ), then you can move tosquares immediately above (? 1, ), right (?, + 1), bottom (? + 1, ), and left (?, 1) of thecurrent plot. The tile you visit must not be off the grid, and must not be awall patch.Determine…Date: Lab Objectives This lab was designed to reinforce the following programming concepts: Using repetition structures. Using decision making Using /0 files. Exercise#1: Counting Number of Digits Write a Java program that inputs one integer number from the user, determine the number af individual digits and prin the number of digits and the digits separated from one another by a tab space. For example, if the user types in the numbe 42339, the program should print "There are 5 digits, which are 4 2339", Sample Input/Output Enter an integer value: 12345678 There are(8 aigite, wrich are(1)2 3 45676 num/13 Exercise#2: Sales A mal-order house sells five products whose retail arices are as follows: Procuct 1. $2. sa; product 2, 54.50; product 3, 34. 481 Eroduct 4. $4.99 and product 5. $6.87. Write a Java program that reads a series of pairs as foliows: product number and product name. The quantity sold is generated at randam between O and 50. Your program should n a svitch statem.ent to…
- True or False The integer values that you assign to enumerators do not have to be unique.Python program - It must show the correct final grade debug the code: subjects = ["Math", "English", "Science", "TLE", "Economics", "Filipino", "Laws", "History"]avg_scores = [] # stores the average scores of each subjectssum_of_avg_scores = 0 # sum of the average scores of each subjecttotal = 100 * len(subjects) # total scorefor i in range(0, len(subjects)):sum_scores = 0print("Enter the 4 exam scores of " + subjects[i] + ".(Total point per exam is 100)")for j in range(4):score = int(input())if 0 <= score <= 100:sum_scores += scoreelse:print("Enter a valid number. ")exit(0)avg_scores.append(sum_scores / 4)sum_of_avg_scores += avg_scores[i]print("The average score of " + subjects[i] + " is: " + str(avg_scores[i]))avg_scores = sum_of_avg_scores / len(subjects) # average scores of each subjectfinal_grade = avg_scores / total * 62.5 * 37 # grade formulaif 98 <= final_grade <= 100:print("The final grade is 1.00 .")elif 94 <= final_grade <= 97:print("The final grade is…7- ______ is the alternate of sizeof(); function. a. strtolower(); b. strtoupper(); c. isset(); d. count();
- Please draw the correct flowchart for this game ? # Function to display question and answer def new_game(): guesses = [] Right_guesses = 0 question_num = 1 num = 1 for key in questions: print("\n------------------------- \n") print("Question " + str(num) + "\n" ) num += 1 print(key) for i in options[question_num-1]: print(i) guess = input("\nAnswer (A, B, C, or D): ") guess = guess.upper() guesses.append(guess) Right_guesses += check_answer(questions.get(key), guess) question_num += 1 display_score(Right_guesses, guesses) # ------------------------- # Function to check answer def check_answer(answer, guess): if answer == guess: print("\nYour Answer Correct!") return 1 else: print("\nYour Answer Wrong!") return 0 # ------------------------- # Function to display score def display_score(Right_guesses, guesses):…Usernames An online company needs your help to implement a program that verifies the username chosen by a new user. Their rules is described below: Username MUST contain at least 6 characters; Username cannot start with a number; Username can only contain letters or numbers. If valid, the username may be resgistered if it doesn't already exist in the system. You should not use built-in functions to determine the character type such as isnumeric() or islower(). Use the strings given alphabet and numeric to determine if each character is valid. Use the list registered to help you determine if the username is already registered. Don't forget to execute the cell below to use these strings # run this cell to create these variablesalphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'numeric = "0123456789"registered = ["john87", "topmage", "light4ever", "username2"] Write a function nameValidation which receives a String argument name. This function: has name String…Usernames An online company needs your help to implement a program that verifies the username chosen by a new user. Their rules is described below: Username MUST contain at least 6 characters; Username cannot start with a number; Username can only contain letters or numbers. If valid, the username may be resgistered if it doesn't already exist in the system. You should not use built-in functions to determine the character type such as isnumeric() or islower(). Use the strings given alphabet and numeric to determine if each character is valid. Use the list registered to help you determine if the username is already registered. Don't forget to execute the cell below to use these strings # run this cell to create these variablesalphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'numeric = "0123456789"registered = ["john87", "topmage", "light4ever", "username2"]