8- Evaluate the following code (5 > 6 || 4> 3) && (7>8)
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: (Financial application: payroll) Write a program that reads the following infor- mation and prints a…
A: CODE:- # Get the employee's namename = input("Enter employee's name: ")# Get the number of hours…
Q: T F: The string concatenation operator automatically inserts a space between thejoined strings.
A: String concatenation means appending a string in front of other string. The code is strcat (str1,…
Q: What will the following code display?values = [2, 4, 6, 8, 10]print(values[1:3])
A: Given: What will the following code display?
Q: Private Sub btnDisplay_Click(...) Handles btnDisplay.click Dim acres As Double 'number of acres in a…
A: Given that What is the output displayed when the button is clicked? Private Sub…
Q: If the new operator cannot allocate the amount of memory requested, it throws_____________
A: Given : If the new operator cannot allocate the amount of memory requested, it throws_____________
Q: ***** Price Markup Calculator ********* Enter Item Amount: 224.47 Markup At: 10% 20% 30% 40% 50%…
A: PROGRAM INTRODUCTION: Start the while loop for the initial step during entering the value of the…
Q: Enter the meal charge: 53.60 For a meal costing $53.60. The total tax is $3.62, tip $10.72, and…
A: Given: As per the given output, I am given a solution in the c++ program and shown the output in…
Q: ** Price Markup Calculator ********* Enter Item Amount: 224.47 Markup At: 10% 20% 30% 40% 50% 246.92…
A: PROGRAM INTRODUCTION: Start the while loop to validate the data entry until the user enters the…
Q: Assignment Description This program will simulate part of the game of Yahtzee! This is a dice…
A: Python code: yahtzee.py:
Q: 1- Get a number from user. 2- If the number is not divisible by 5 then find out how much more you…
A: Summary: In this question, we have to write a program in C++. In the program, we have to take a…
Q: H.W/ The following sequence is called a Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...…
A: given data is The following sequence is called a Fibonacci sequence: 1, 1, 2, 3, 5, 8, 13, 21, 34,…
Q: Form1 should accept weight and height values and return body mass index. The body mass index formula…
A: C# CODE :- using System; namespace string[] values = Console.ReadLine().Split(' ');int w =…
Q: Correct the following code. Keep the first line of code (double* getValue () {) double getValue() {…
A: “Since you have asked multiple question, we will solve the first question for you. If youwant any…
Q: //Below is the starting code for this homework assignment// #include struct employees {…
A: To take input in the readEmployee function we use the arrow operator to take the input (->) It…
Q: Design an application that accepts 10 numbers and displays them in descending order.
A: Given: Design an application that accepts 10 numbers and displays them in descending order.…
Q: alate the value of
A: The big-O notation is a type of asymptotic notation that is used to describe the order of growth of…
Q: switch_player(): we will allow the players to choose their own names, but for our purposes, it is…
A: Python is a high-level, object-oriented programming language. Python is a dynamic data type…
Q: Travel Tickets Company sells tickets for airlines, tours, and other travel-related services. Because…
A: Required: write an application that indicates invalid ticket number entries. The class prompts a…
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: Introduction to python programming
A: The python program and its approach are given below: - Approach: - Creating a nested list and…
Q: .35 (Sides of a Triangle) Write an application that reads three nonzero values entered by the user…
A: #include <iostream>using namespace std; int main(){ double a, b, c;…
Q: 1- printlnfo: This function prints your name and ID to the screen. 2- caleShapeArea: This function…
A: First, we need to display the menu, then we need to read the required input parameters and then…
Q: What will the following code display?mystring = 'abcdefg'print(mystring[3:])
A: mystring = 'abcdefg' print(mystring[3:])
Q: 2.25 (Divisible by 3) Write an application that reads an integer and determines and prints whether…
A: NOTE : As the question is not specific about the programming language to be used to code the…
Q: What will the following code display?mystring = 'abcdefg'print(mystring[2:5])
A: string_name[a:b] is called string slicing where character from index a to b will be printed.
Q: The following function has errors. Locate as many errors as you can. void getValue(int value&) {…
A: GIVEN: The following function has errors. Locate as many errors as you can. void getValue(int…
Q: #include struct employees { char name[20]; int ssn[9]; int yearBorn, salary;…
A: #include <stdio.h> struct employees { char name[20]; int ssn[9]; int yearBorn,…
Q: 2) #include struct uu 11 8 5 8 11 11 5 15 int x; struct uu *p; }; struct uu fun(struct uu d) d.x *=…
A: Structure: It is similar to class. It holds the variable of different data types under the same…
Q: Create an application that contains an enumeration that represents the days of the week. Display a…
A: Enum has to be created Display the values Input a day Display business hours If you want to perform…
Q: What will the following code display?numbers = [10] * 5print(numbers)
A: What will the following code display?numbers = [10] * 5print(numbers) Answer :- [10 10 10 10 10…
Q: Please comment all of the following code by using multiple line comment symbol. 1/1 int main() {…
A: Commenting the line of code with multiple line comment in c++
Q: What will the following code display?names = ['Jim', 'Jill', 'John', 'Jasmine']if 'Jasmine' not in…
A:
Q: What does the following code display?values = [2] * 5print(values)
A: values = [2] * 5print(values) Here the number inside [] square bracket means we are creating a…
Q: Block elements are normally displayed without starting a new line. * False O True
A: answer is
Q: Evaluate the following expression: ((8.0 / 2) * 8) + 10 % 6
A: Given ((8.0 / 2) * 8) + 10 % 6
Q: result = half(number)8. What will the following code display?xdef…
A: Given: result = half(number)8. What will the following code display?xdef…
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: Module/Week 2 ASSIGNMENT (INPUT/OUTPUT) The number of permutations of a set of n items taken r at a…
A: PROGRAM: //include the required header file #include<iostream> using namespace std;…
Q: What will the following code display? mystring = 'abcdefg' print(mystring[:])
A: The variable myString is a string storing value abcdef
Q: Bonus Quesion 2: What the following code does? int * DataGroup = new int [100]; if (!DataGroup){ ...…
A: C++ programming language is an object-oriented programming language, that's used to build…
Q: (Health application: BMI) Revise Listing 3.2, ComputeAndInterpretBMI.cpp, to let the user enter…
A: Sample Response: //C++ program to compute BMI by using weight in pounds, height in feet and…
Q: The price of a plane ticket is 1000$ by default, but discounts are applied to it based on different…
A: If-else block is a part of the conditional statements.
Q: V7 This pseudocode is intended to display // employee net pay values. All employees have a standard…
A: Program plan: Declare the variable name Define the variable EOFNAME as "ZZZZ" Define DEDUCTION as…
Q: the quotient after q is divided by divisor and assign the result to q. Write this statement in two…
A: Method 1: Simple assignment operator q = q % divisor; Method 2: Modulus AND assignment operator q %=…
Q: color: one of the following strings: 'red', 'blue', 'silver', 'white', 'black' year: year of…
A: Task :- Give an expression for given statement.
Q: What will the following code display?for number in range(2, 6):print(number)
A: What will the following code display? for number in range(2, 6): print(number)
Q: What will the following code display? mystring - 'abcdefg' print(mystring[-1:0:-1])
A: #intialise the string mystring='abcdefg' #slice is used here to print reverse of the string…
Step by step
Solved in 2 steps
- (Sort three numbers) Write the following function to display three numbers in increasing order: def displaySortedNumbers(num1, num2, num3): Write a test program that prompts the user to enter three numbers and invokes the function to display them in increasing order. Here are some sample runs:Variable names in C, generically called identifiers, use the underscore character to mash together words to make useful names. This is called snake case. For example, double city_sales_tax = 0.08; int days_in_year_2018 = 365; char superman_letter = ‘s’; char *mothers_maden_name = “Smith”; Another way to do this is to omit the underscore but to capitalize the first letter of each word in the identifier, except for the first word. This is called camel case. For example, double citySalesTax = 0.08; int daysInYear2018 = 365; char supermanLetter = ‘s’; char *mothers_maden_name = “Smith”; These are called naming conventions. In general, you can use either in your programs, BUT you need to constantly use one or the other in your code, and avoid mixing the 2 in the same program. Which one makes the most sense to you, and why?5. A function can return a value of an enumeration type. True False
- Based on the following declaration and initialization, write C++statement to perform the following tasks: const int sROW = 5;const int sCOL = 3;int NUMBER[sROW][sCOL] ={7,3,10,10,15,14,18,14,20,22,31,1,4,6,21}; int row, col;Write the C++ statements:(a) To display ALL elements in NUMBER [][].(b) To calculate and display value for total in:i. Row 4.ii. Column 2.(c) To display the smallest value for:i. Each row.ii. Each column.This is the C code I have so far #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int yearBorn, salary; }; struct employees **emps = new employees()[10]; //Added new statement ---- bartleby // function to read the employee data from the user void readEmployee(struct employees *emp) { printf("Enter name: "); gets(emp->name); printf("Enter ssn: "); for(int i =0; i <9; i++) scanf("%d", &emp->ssn[i]); printf("Enter birth year: "); scanf("%d", &emp->yearBorn); printf("Enter salary: "); scanf("%d", &emp->salary); } // function to create a pointer of employee type struct employees *createEmployee() { // creating the pointer struct employees *emp = malloc(sizeof(struct employees)); // function to read the data readEmployee(emp); // returning the data return emp; } // function to print the employee data to console void display(struct employees…If the new operator cannot allocate the amount of memory requested, it throws_____________
- 10. Examine the following code segment. What will be printed? If there are any errors indicate the nature of the error. int a[9] = { 1, 12, 3, 14, 25, 16, 7, 8, 9 }; int *ptr ; ptr = & a[ 2 ] ; for( i = 1; i <= 5; i = i + 2) cout << a[i] << *( ptr + i ); cout << ” ” << a[0] << ” ” << *ptr << ” ” << *ptr - 1 << ” ” << *(ptr - 2));Question 1 is already done need help with the others though This is the C code I have so far #include <stdio.h> #include <stdlib.h> struct employees { char name[20]; int ssn[9]; int yearBorn, salary; }; struct employees **emps = new employees()[10]; //Added new statement ---- bartleby // function to read the employee data from the user void readEmployee(struct employees *emp) { printf("Enter name: "); gets(emp->name); printf("Enter ssn: "); for(int i =0; i <9; i++) scanf("%d", &emp->ssn[i]); printf("Enter birth year: "); scanf("%d", &emp->yearBorn); printf("Enter salary: "); scanf("%d", &emp->salary); } // function to create a pointer of employee type struct employees *createEmployee() { // creating the pointer struct employees *emp = malloc(sizeof(struct employees)); // function to read the data readEmployee(emp); // returning the data return emp; } // function to…What does the following code display?numbers = [1, 2, 3, 4, 5, 6, 7, 8]print(numbers[-4:])