Q3/ Write a program to compute and display a person's weekly salary as determined by the following conditions: If the hours worked are less than or equal to 40, the person receives $12.00 per hour; otherwise, the person receives $480.00 plus $18.00 for each hour worked over 40 hours. The program should request the hours worked as input and display the salary as output. HINT: using functions.
Q: (You should do the previous two programming projects before doing this one.) Write a program that…
A: A programming language that allows to a dividing problem into smaller problems is known as Modular…
Q: QUESTION 22 Write ONLY the function to do the following: Input a number selected by the user That…
A: Answer: Here not mentioned any programming language so we will do code in C++ Programming language…
Q: What is the output of the code below? def mystery_func(input, num, t = 0, x = 10, y = 10) [this…
A: The output of the code is 1.
Q: What is the output of the code below? def mystery_func(input, num, t = 0, x = 10, y = 10) [this…
A: Solution :
Q: Write a function double paymentDue (double price) which accepts the price of an item and returns the…
A: I have provided a solution in step2
Q: c++. Write a function that computes the average and standard deviation of four scores. The standard…
A: Functions for calculating the average and standard deviation are being forward declared. Declare and…
Q: etter o, the following pyramid will be printed. It can be assumed that the screen width is 80…
A: Code: def print_pyramind(c): charArray = 'abcdefghijklmnopqrstuvwxyz' index = 0…
Q: Complete the following program. An object floats in any fluid, if the density of the object is lower…
A: Sample Response: //C++ programming language, tested on CodeBlock IDE#include<iostream>using…
Q: Question 1) Write the following function by using if statement: et - 1, x 10 y=
A: I give the code in Matlab along with output and code screenshot
Q: Display the first N magic numbers, where N is a positive number that the user provides as input.…
A: Program code: #include <iostream>using namespace std; bool isMagic(int value);int main(){…
Q: Q2\A) Write a function that finds the factorial of an integer, the main program calls the function…
A: Factorial of a number n is calculated as the product of numbers from 1 up to n is called the…
Q: Make a function that determines if a triangle is equilateral, scalene, or isosceles given the length…
A: ANSWER:-
Q: Write a program to take input for a number, if the number is palindrome, then display its half on…
A: Approach: Three functions are used: isPalindrome() function accepts an integer and returns 1 if the…
Q: Write a program that takes hours and minutes as input and outputs the total number of minutes (1…
A: CODE:- #include <stdio.h>int hrs; int mins; int tot_mins; const int HOUR =…
Q: Complete the function given below which takes an integer parameter which is the age of a person and…
A: Start Input age Call function Print result Stop
Q: Q2/Write a program that reads from the user the value of x and apply the function below:
A: Consider the given functions : Note: Since the programming language is not mentioned i used "C"…
Q: Write a program to take input for a number, if the number is palindrome, then display its half on…
A: Note: Programming language is missing in the question. So we will answer this program in C++. If…
Q: 3. Write and test a function hydroxide that returns a 1 for true if its string argument ends in the…
A: The complete code is given below.
Q: A weight in pounds can be converted to an equivalent weight in kilograms. Write a function that…
A: The program is written in C language. Please check the source code in the next step.
Q: Write a statement that calls the function IncreaseItemQty with parameters mugInfo and addStock.…
A: Write a statement that calls the function IncreaseItemQty with parameters mugInfo and addStock.…
Q: Q17/ Write a program to compute and display a person's weekly salary as determined by the following…
A: Sample Response: //C++ program to calculate the weekly salary of a person#include…
Q: Write a function with the following header to multiply the three numbers with a constant value: void…
A: #include <iostream.h> void multiply( double & num1 , double& num2, double & num3,…
Q: Write a program in c++ that asks the user to input two numbers. If the first number entered is…
A: CODE:- #include <iostream>using namespace std;void check(int n1, int n2);int main(){ int…
Q: Given the following functions: void increment(int x, int y) { X+=y; } int main() { int n=10, amount…
A: Given:
Q: 1. Write a parameter and return program that will require the user to enter a temperature in Celsius…
A:
Q: Q15/ Write a program in c++ to display the message: "PROCEED" or "ABORT" depending on the input. If…
A: C++ is one of the most popular programming languages developed by Stroustrup at Bell Labs. The basic…
Q: Write a function called adder which has a variable number of integers as arguments and returns the…
A: The code is given below.
Q: Write a split_check function that returns the amount that each diner must pay to cover the cost of…
A: According to the information given:- we have to create a split_check function to divide the dinner…
Q: Q9/Write a program that inputs a three-digit integer, separates the integer into its individual…
A: Procedure: Write a program that inputs one 3-digit.Separating Digits in Associate in Nursing…
Q: When you call above functions, display a message telling how many times it has been called: “I have…
A: code: #include<iostream>#include<conio.h>using namespace std;void…
Q: You should not define any functions. It has an if and an else. Whatever conversion you did, give the…
A: This is a simple use of if and else statements. The program in Java is given below
Q: Q9/Write program. in c++ a that inputs three-digit integer, separates the integer into its…
A: The program reads a 3 digit integer value from the user using a variable n then separates each…
Q: Write a program in c++ to display the message: "PROCEED" or "ABORT" depending on the input. If the…
A: The C++ program should display "PROCEED" for user input character "g". If the character entered is…
Q: Write a function averageDigits that computes the average of the digits of a 3-digit positive number…
A: Here is the c++ program. see below steps.
Q: Write function headers for the following functions (and indicate whether the function returns a…
A: NOTE:“Since you have posted a question with multiple sub-parts, we will solve first three subparts…
Q: Write a function averageDigits that computes the average of the digits of a 3-digit positive number…
A: The function averageDigits() takes an integer parameter and returns the average of all digits that…
Q: Write a function that checks whether an integer is an even digit or an odd digit integer using the…
A: Odd or Even: A certain variety is given conjointly the} task is to count even digits and odd digits…
Q: What value will be returned by the function if a = 8, b=12? int func(int a, int b){ if(a>b){ return…
A: Find the value returned by the given function named "func" if the parameters are a=8 and b=12.
Q: Write a function that computes a future investment value at a given interest rate for a specified…
A: Below is the required python program. Program Approach: Declare a futureInvestmentValue function…
Q: Given the following: printf ( “Enter your age in years: “ ); scanf ( “%d”, &age_in_years );…
A: When the age is 33 then the value of is_voting_age variable and is_drinking_age variable will be 1…
Q: 2. Write a program to accept a positive integer is entered through the keyboard. Write a function to…
A: Note: In this question, the coding language is not specified then we are doing this question in the…
Q: I am facing some issues with this c++ question. any help would be appreciated.
A: Program approach: Create main function. The while loop is used to repetitively input. Input gender…
Q: create a conversion program. First ask the user his choice and then convert. 1) Conversion from…
A: Program Approach: Define the conversion method from Pound to Kg. Define the conversion method from…
Q: Write a function with the following header to display the even digits in an integer: void…
A: C programming: C is a programming language developed by Dennis Ritchie in 1972. It is a general…
Q: Write a main function that performs the following: • Prompts user to enter 2 integer values A and B.…
A: The program for the given problem is solved by using C programming language. Algorithm: The…
Q: 11/ Write a program in c++ that converts .kilometers per hour to miles per hour Hint: miles…
A: Code: #include<iostream>using namespace std; int main(){ float kmph, miph; cout <<…
Q: Q1. Write a program so that it asks for x and n values to calculates the sum of the following series…
A: We need to write a program for the given scenario. Language used is C++.
Q: You have probably given programming assignments with a complete list of requirements as well as a…
A: Given The above instructions of java function program below
Q: Question # 12: Write a program to check whether a number entered by a user is prime number, even…
A: Note: Below is the required program in the C++ language. Programming Approach: Using necessary…
Q: Question 21 Consider the following functions' definitions and answer the question below int Funab…
A: PROGRAM: //Header file #include <iostream> //Using namespace using namespace std;…
Q: Please use C++. Write the following function declarations as they would appear on single lines above…
A: Function declarations in C++ a. bool doTheLogic(bool a) b. bool doTheLogic(bool a, bool b) c. bool…
Q: 1. Which of the expression below can be used to calculate whether it is even or odd? if (num % 2 =…
A: Answer 1: C (if(num%2==0)) Answer 2: C (unary +: As increment ++ and decrement -- comes under…
Step by step
Solved in 2 steps with 1 images
- 3 Write two different functions which have the following results with input 1 and 2. It means that these two different functions are equivalent at input 1 and input 2.Q9/Write a program that inputs a three-digit integer, separates the integer into its individual digits and prints the digits separated from one another by three spaces each by using functions. For example, if the user types in 429, the program should print: 4 2 9Write a function double paymentDue (double price) which accepts the price of an item and returns the cost of the item. There is a 2.5% tax on items sold. Double paymentDue (double prce)
- program - python Write a program that asks the user to enter four test scores. The program should display a letter grade for each score and the average test score. Write the following functions in the program: calc_average—This function should accept five test scores as arguments and return the average of the scores. determine_grade—This function should accept a test score as an argument and display the letter grade for the score within the function, based on the following grading scale: Score Letter Grade 90–100 A 80–89 B 70–7 9 C 60–69 D Below 60 F**PLEASE READ THE WHOLE QUESTION!!"" Write a python, program that prints a pyramid made of letters in the middle of the screen. Use functions with parameters for this assignment. The base width of the pyramid is determined by a character the user enters. If the user enters the letter o, the following pyramid will be printed. It can be assumed that the screen width is 80 characters. The following assignments make use of functions with return values ("fruitful functions"). So if the user enters the letter o it will print the ******The input is not always o, the input o is just an example, so the user can enter also a letter like u or w or something else******** **nBesides that the code may not have the charArray = 'abcdefghijklmnopqrstuvwxyz', but it needs to have the range code like (range(97,123)) or something else **3. Write a program to take input for a number, if the number is palindrome, then display its half on the screen, otherwise take input for 2 more numbers, and display their product on the screen. Use minimum two functions including main function.
- Q13/ Write a program in c++ that asks the user to input two numbers. If the first number entered is greater than the second number, the program should print the message: "The first number is greater." Otherwise, it should print the message: "The first number is smaller." .By using functionsWrite two functions that implement the following conversions:a. Function celsius receives a Fahrenheit temperature and returns its Celsius equivalent.b. Function fahrenheit receives a Celsius temperature and returns its Fahrenheit equivalent.Write a test program (main function) that uses celsius and fahrenhiet to print the following table.Celsius Fahrenheit | Fahrenheit Celsius40.0 104.0 | 120.0 48.8939.0 102.2 | 110.0 43.33...232.0 89.6 | 40.0 4.4431.0 87.8 | 30.0 -1.11What is the output of the code below? def mystery_func(input, num, t = 0, x = 10, y = 10)[this function multiples all arguments together (except t) and raises the result to the power of t and returns it]print(mystery_func(num = 9, input = 3, t = 1, y = 1))
- Write a function that takes a gross salary and calculates the net salary by deducting: • 7.65% for FICA • x for federal taxes • y for state taxes • z for local taxes Also, deduct $75 for parking fees and $22.50 for a gym membership. The federal tax rate must be between 10 and 37 percent. The state tax rate must be between 3.25 and 11.33 percent. The local tax rate may not be greater than 3%. If any of those values are outside the valid range, return INVALID_PERCENTAGE from your function. Federal, state, local taxes, and gym membership amounts should be passed in by value. FICA and parking should be a global constant. COMPUTER LANGUAGE IN CWhat is the output of the code below? def mystery_func(input, num, t = 0, x = 10, y = 10)[this function multiples all arguments together (except t) and raises the result to the power of t and returns this]print(mystery_func(2, 3))Given the following: printf ( “Enter your age in years: “ ); scanf ( “%d”, &age_in_years ); int is_voting_age = ( age_in_years >= 18 ); int is_drinking_age = ( age_in_years >= 21 ); int can_be_president = ( age_in_years >= 35 ); int is_senior_citizen = ( age_in_years >= 65 ); When the age entered is 33, what are the values of the variables above? When the age entered is 12, what are the values of the variables above? Write an IF statement in a function to print ‘Yes’ for each value above that is true.