The ________ function returns no value. a) malloc() b) realloc() c) free() d) calloc()
Q: When the following main function runs, what will display on the screen? int main() {int number;…
A: Output: The value is number
Q: write the psuedocode and drow the flowchart Create a program to enter grades and calculate averages…
A: In this question it asked to give the pseudocode and draw a flowchart. The question needs to create…
Q: 1.Balloon Emporium sells both latex and Mylar balloons. The store owner wants a pro-gram that allows…
A: Answer:-
Q: C++ Visual 2019 A particular talent competition has five judges, each of whom awards a score…
A: Note: As score can double data type ,so, return type of findLowest() and findHighest() function…
Q: function comments. (a) Consider the following main function: int main() { display_numbers…
A: // studio.h is the C standard library it is a header file stdio.h which stands for standard…
Q: FizzBuzz Interview Question Create a function that takes a number as an argument and returns "Fizz",…
A: NOTE - I have used python programing language for solving the problem. Here I have defined the…
Q: 2. Loan Repayment' Write a program that helps a loan company determine the payment schedule for…
A: HI THEREI AM ADDING ANSWER BELOWPLEASE GO THROUGH ITTHANK YOU
Q: 5. Design a pseudocode function named getFirstName that asks the user to enter his or her first…
A: for 5th ques your code is given below:
Q: /* Program Name: BadDate.cpp Function: This program determines if a date entered by the user is…
A: Required C++ code according to sample code provided given below :
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: Question 1 Create a VB.NET Console Application that does the following: Create a variable of Integer…
A: Module VBModule Sub Main() Dim marks as integer' to declare marks as integer Dim grade as…
Q: Dart game: Dart location Write a function called DartNumbers() that takes the location of darts…
A: In given radius of area C is 1,B is 2 and A is 3. Then total area of circular region with radius 3…
Q: 10. Future Value Suppose you have a certain amount of money in a savinggs account that earns com-…
A: Required:
Q: s as indicated by the comments. na directory of your choice, and then make th le Calculator.cpp.
A: Complete c++ code: #include <iostream>#include <string>using namespace std; // Write…
Q: User defined Funetion: Void Function 3. Create a program that will add, subtract, multiply and…
A: Solution: Programming language used: C Program code in C: (Note: all necessary comments are…
Q: mployees of a supermarket. The report lists total hours for // each day of one week. // Input:…
A: code : #include <iostream> #include <string> using namespace std; //main function…
Q: int main() #Fil in the code to define and initialize to 1 the variable onth float total = 0, rain,…
A: A sentinel value is a special value that is used to terminate a loop. In the given problem the month…
Q: User defined Function: Void Function 3. Create a program that will add, subtract, multiply and…
A: ALGORITHM:- 1. Print the initial menu. 2. Take input for the choice. 3. Perform the corresponding…
Q: #include // this line can be placed second instead of first #include // this line can be placed…
A: Approach: Import the essential header. Defining the main method. Initialize the symbolic constant…
Q: 2.26 (Multiples) Write an application that reads two integers, determines whether the first is a…
A: C++ Program for above : #include <iostream> using namespace std; int main() { //read…
Q: create a pusedocode #include #include #include using namespace std; int main (){ float…
A: Declare variables ga,fir,sec,thir,fin, q1, q2, q3, L1, L2, L3, L4, LP,t,fe,le,p,q; Input…
Q: #include #include #include double area (double r); // this starts the definition for the area…
A: #include <iostream> #include <math.h> #include <cstdlib> double area (double r);…
Q: Customized step counter Learning Objectives In this lab, you will Create a function to match the…
A: here we are calculating the miles walked based on the number of steps given and the stretch of each…
Q: View //This pseudocode is intended to display employee net pay values. E//All employees have a…
A: The solution for the above given question is given below:
Q: FizzBuzz Interview Question Create a function that takes a number as an argument and returns "Fizz",…
A: 1) Since you have not specified programming language, I have written program in python. 2) Below is…
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: change normal body temperature to 36.5–37.5 °C #include using namespace std; int main() { float…
A: Given, Change the code so that normal body temperature is 36.5–37.5 °C
Q: cin function is not used to read a string because It stops reading after pressing space It is used…
A: The answers are given below with example and explanation
Q: 4.23 (Financial application: payroll) Write a program that reads the following information and…
A: C code#include<stdio.h>#include<string.h> int main(){char employeeName[20]="";double…
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: This is a program in C language. Help me debug this program. it has 3 errors. Please upload a…
A: Given program is a C++ program, not C program. Because iosteam, cout, cin all these are used in C++.…
Q: This is a set of Alphanumeric characters and Punctuation characters. Control Characters Printable…
A: 1.Alphanumeric characters and punctuation characters Answer: all of the mentioned To find…
Q: ployee struct as a single struct. You wi employees out to a file. The SAVE com Y argument and…
A: The file code is given as,
Q: (Financial application: payroll) mation and prints a payroll stater Employee's name (e.g., Smith…
A: Code: import java.util.Scanner; public class Main { public static void main(String[] args) {…
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: 7. (Medium) (Financial application: initial deposit amount) Suppose you want to deposit a certain…
A: c++ program #include<math.h>#include <iostream>using namespace std; //driver functionint…
Q: Rectangle Area The area of a rectangle is calculated according to the following formula: Width X…
A: Program Code: #include<stdio.h>int area(int w,int l){ int area; area=w*l; return;}main(){ int…
Q: NumberFun.py # using multiple functions. # copy/paste this program to run it first, you are supposed…
A: Actually, python is a easiest programming language It is a dynamically typed programming language.
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: 1. Retail Price Calculator Write an application that accepts from the user the wholesale cost of an…
A: The code and the output are given below:
Q: // Computation.cpp - This program calculates sum, difference, and product of two values.// Input:…
A: Given: // Computation.cpp - This program calculates sum, difference, and product of two values.//…
Q: Flowchart, create. #include #include using namespace std; // Write performOperation() function…
A: Flowchart is in step 2.
Q: 7. (Medium) (Financial application: initial deposit amount) Suppose you want to deposit a certain…
A: C++ In this program , we just have to enter all values required to calculate initialDepositAmount .…
Q: The array of sales data is as follows: Owner sales = [201.45, 550.00, 117.65, 55.25, 5.95, 365.45]…
A: To do: The given
Q: Test Average and Grade ite a program that asks the user to enter five test scores. The program…
A: Java code along with the snapshot of code and output is given below:
Q: True or False The order of operations dictates that the division operator works before the addition…
A:
Q: Help me do a program using Java functions
A: Answer:-
Q: (Fraction calculator) | Write a program that lets the user perform arithmetic operations on…
A: Program code: //include the required header files #include<iostream> using namespace std;…
The ________ function returns no value. a) malloc() b) realloc() c) free() d) calloc()
Step by step
Solved in 2 steps
- C++ programming Chapter(s) Covered: Chapter 1-8 Concepts tested by the program: Working with one dimensional parallel arrays Use of functions Use of loops and conditional statements Project Description The Lo Shu Magic Square is a grid with 3 rows and 3 columnsshown below. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 – 9 exactly. Each number 1 – 9must not be used more than once. So, if you were to add up thenumbers used, The sum of each row, each column and each diagonal all add upto the same number, Write a program that simulates a magic square using 3 onedimensional parallel arrays of integer type. Each one the arrays corresponds to a row of the magicsquare. The program asks the user to enter the values of the magicsquare row by row and informs the user if the grid is a magicsquare or not. See the sample outputs for more clarification. Project Specifications Input for this project: Values of the grid (row by row) Output for this…You can dereference a smart pointer with the * operator. True Falsefunction main() { # ist: input numbers #w: outer for loop index # X: inner for loop index # y: number of parsmeters # min: index for max value at the time of iteration # buf: used for swapping ____________________a _______ #declare local vars let=___________b___ #intialize aary with the parametrs y= _______c___ # find the lenght of lstfor((________________)); do min=________e_____ # intialize main index for ((___________f_______)); do # find index for main value in one line. use a short tets. _________g_____done # swap- two values using two indices, min and outerloop # use buf to hold value when swapping ________________h________ # move min lst [.] to buf ________________i_______ # move lst[.] to lst[.] _________________j_____ # move buf to lst[.]done}main "@" # pass the input parameters to the function main# end of bash script show me the ss when u run chatgpt doesnt give right code
- def main(): monthlySales = getSales() printbonus=print_bonus(storeAmount,empAmount) #This function gets the monthly salesdef getSales(): monthlySales = float(input('Enter the monthly sales $')) monthlySales = getSales() #call to get sales salesIncrease = getIncrease(monthlySales) return monthlySales #This function gets the percent of increase in salesdef getIncrease(monthlySales): storeAmount = storeBonus(monthlySales) salesIncrease = float(input('Enter percent of sales increase: ')) salesIncrease = float(salesIncrease) salesIncrease = salesIncrease / 100 return salesIncrease #This function determines the storeAmount bonusdef storeBonus(monthlySales): if monthlySales >= 110000: storeAmount = 6000 elif monthlySales >= 100000: storeAmount = 5000 elif monthlySales >= 90000: storeAmount = 4000 elif monthlySales >=80000: storeAmount = 3000 else: storeAmount = 0 return storeAmount #This function…Pseudocode for the student grade calculator program, please Create a program to enter grades and calculate averages and letter grades. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation. Nice Features: I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the…Code Example: def get_volume (width, height, length=2): volume width * * height length return volume def main (): 1 3 W = 4 h = 5 V = print (v) = get_volume (1, w, h) if name main () "1 main : 1.) Refer to the Code Example: What value is passed to the height argument by the call to the get_volume() function?
- Flowchart for student interface program please. Create a program to enter grades and calculate averages and letter grades. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation. Nice Features: I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the final…pointers as Arguments:In the C programming language there is no pass-by-reference syntax to passa variable by reference to a function. Instead a variable is passed by pointer(just to be confusing, sometimes passing by pointer is referred to as pass byreference). This Practice Program asks you to do the same thing as C.Here is the header for a function that takes as input a pointer to an integer:1. void addOne (int ∗ptrNum )Complete the function so it adds one to the integer referenced by ptrNum.Write a main function where an integer variable is defined, give it an initialvalue, call addOne, and output the variable. It should be incremented by 1.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"]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 registerName which receives a String username and it returns a string message. This…Lowest Score Drop Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of the five scores to be entered. void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main and should be passed the five scores. int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. Input Validation: Do not accept test scores lower than 0 or higher than 100.