Advisor should be able to input name of advisee and CGPA. Program should give the output as follows "Amir can take 6 courses in the semester".
Q: In this task, you need to evaluate the following four expressions and demonstrate at least 5 steps…
A: GIVEN:
Q: In this task, you need to evaluate the following four expressions and demonstrate at least 5 steps…
A: a%(b-c)/d+(e*f) 2%(1-5)/21+(50 * 2) 2%(-4)/21+100 0/21+100 100 100 is the final answer
Q: PYTHON ONLY Please create a code that checks if 'user' favourite game is in the top 3 games. if…
A: Answer:
Q: e
A: you forgot to provide the table names. that really does not matter here. let us call the first table…
Q: tions and me
A: There is a shape function to determine the shape of a matrix. There is a size function to determine…
Q: Create the Flow Chart and JAVA. Input the following: Sex[Male or Female], Course[Indicate all…
A: In questions with many parts, we must solve the first 3. Except the city constraint, all other…
Q: Q1. a) Write code to find the average of 58 students, each student has 7 marks, print student name…
A: Note :- You have not mention the language of the code, So I am doing your question in C++.
Q: The statement cout << "a = 5;"; is a typical example of an assignment statement: Select one: O True,…
A: Please find the answer below :
Q: Specifically, you need to complete: Inputs Birth Date Start Date Retirement Date Initial Investment…
A: Explanation: Include the necessary header files. Create a class to store data members. In the main…
Q: named boston pass. This program will tell the user whether they passed a course or not. Please read…
A: I have written the code below:
Q: Draw a flowchart that accepts mark of N students in a class. Calculate and display the average mark…
A: To represent any program in a graphical way or in sequential way where each step is represented in…
Q: Which of the following formulas properly produces the string "Income Statemen "Income "Statement…
A: The command is Strinh1&""&String2 In that case answer is 2nd option
Q: You are to design a fight game between Neo versus Smith. The program needs to be organized using at…
A: Declare header files <stdio.h>, <stdlib.h>, <time.h> , <termios.h>,…
Q: Write a flow chart for the case below: The unit for electricity usage is kWh. For domestic usage,…
A: The flow chart is given below for the above-given question:
Q: User Satisfaction team wants to send monthly summaries for each user. They need the following…
A: ANSWER:-
Q: Choose the correct answer to fill the blanks in the following Questions. is an optional clause…
A: Introduction: is an optional clause available for the Case Structure when no match is found in…
Q: 1- You are required to draw flow chart and write a Pseudocode for the following problem statement:…
A: The flow chart is a way of analyzing, designing a program. It is a diagrammatic representation of…
Q: i. Which of the followings are not valid names for identifiers/variables? 1. first_name 2. 2modules…
A: The rules for declaring a variable name are:- 1. It should not start with a number. 2. It should not…
Q: Write code to get information of 5 students (Exam id , average) then check the average them if it is…
A: As no programming language is mentioned, it is solved using basic C++
Q: According to the last digit of your Student number, write the following Matlab scripts. Write a…
A: Code: brands=[1 2 1 3 2 2 1 3 3 2]price=[30000 20000 35000 20000 22000 31000 33000 24000 16000…
Q: According to the following code; you are required to draw the flowchart in details with clear…
A: the flowchart is given below
Q: Write the following string with your information: string="Moead Rehan 19-arid-814"
A: Huffman Coding Coding from Huffman is the lossless algorithm for data compression. The goal is to…
Q: Q1 // Follow the following program, explaining the results: (If you know that L is your grade in the…
A: - We have to track the values of L and K from the program given.
Q: William is facilitating a get-together for n of his broker companions. They began a conversation on…
A: Here have to determine about William's companion problem statement.
Q: Write one line of code ONLY. Use concatenation to print the variables given below in one line with a…
A: python code: A="Artificial"I="Intelligence"print(A +" " + I)
Q: Draw a flowchart that will read and print the names and individual score of 50 students for a…
A: The Answer is in Below Steps
Q: Q2/ Draw the flowchart required to determ passed or not (NOTE: the student have 4 su average more…
A: Flow chart is a way to design an algorithm in a fluid way. To create a flow chart for the student…
Q: CHALLENGE 1.24: Read multiple user inputs. ACTIVITY Write two scnr.nextint statements to get input…
A: Given below is the program to get input values for month and year and write the output value as a…
Q: Use the IF function to calculate the down payment starting in H11. If type = Finance, then the down…
A: In the given question , The values of the column : "Down Payment" have to be evaluated based on the…
Q: SELECT Name, Dept, Salary FROM students WHERE name LIKE ´_a%' AND salary IS NOT NULL; Which of the…
A: I am going to answer both the question. In First SQL query we are using wild card like which is…
Q: Question 1: Ask user to enter age, sex ( M or F ), marital status ( Y or N ) and then using…
A: I have provided JAVA CODE along with CODE SCREENSHOT and also provided OUTPUT…
Q: This function returns the location of a local variable named . The group of response options is…
A: They have a limited scope, meaning they can only be utilized within the functions that define them.…
Q: Clunker Motors Inc. is recalling all vehicles from model years 2001-2006. Given an int variable…
A: #include <iostream> using namespace std; int main() { int modelYear; std::cout << "Enter…
Q: 1-) Ask user's name and keep it in name variable. 2-) Get a midterm grade from.user(0-100). 3-) Get…
A: The Program in C++ :
Q: Assignment 3: Mississippi Now write the MISSISSIPPI program!
A: Introduction of the Program: The C++ program displays the word "MISSISSIPPI" using asterisks. The…
Q: evaluate the following four expressions and demonstrate atleast 5steps of evaluating them.
A:
Q: The program must accept the Employee Number, Salary and Employee job grade, calculate each…
A: import java.util.Scanner; public class TaxReport{ public static void main(String args[]){ Scanner…
Q: Calculate the wages of an employee by engaging the user with the input command to enter their hourly…
A: Below is the required code in MATLAB to calculate the wages of an employee:
Q: Display the output similar to the output given below: Your StudentID Student ID Student Name Your…
A: #Code:- I have used C++ programming language because you have not mentioned in the question.…
Q: Write a simple interest function that calculates simple interest with VBA. (can be try at excel.)
A: required: function to calculate simple interest
Q: (True/False): The PROC directive can contain a USES operator, but the PROTO directive cannot.
A: PROC directive The PROC directive is one of the assembly directives that identify the beginning of…
Q: Given: enum cropType {WHEAT, CORN, RYE, BARLEY, OATS}; cropType crop; which of the following…
A: Given code:
Q: User Satisfaction team wants to send monthly summaries for each user. They need the following…
A: Hey! You forgot to provide the table names. That really does not matter here. Let us cal the first…
Q: This function checks if a character is a vowel. If it is, it returns true. Otherwise, it returns…
A: Given:
Q: The following program which was submitted as extra credit in week 7 prints out a triangle of stars…
A: Code: main: pushrbp movrbp, rsp subrsp, 16 movDWORDPTR [rbp-4], 4 jmp.L2 .L5: moveax, DWORDPTR…
Q: What is the following variables in camel case: NUMBEROFDAYS
A: In programming language, there are mainly three types of variable cases, that are: Camel case Snake…
Q: you are required to ask the user to enter three words and save these words to a string, what C++…
A: Since you have asked multiple questions, we will solve the first question for you. If you want any…
Q: It is possible to nest functions in JavaScript Select one: O True O False
A: Given True or false About the statement it is possible to nest functions in javascript
Q: 2/ Write code to get information of 5 students (Exam id , average) then check the average them if it…
A: It is case of simple if else and parallel array. Declare two array . One is ID and second one is…
java program
Step by step
Solved in 2 steps with 1 images
- program5_2.pyYou have a business that cleans floors in commercial space and offices. You charge customers $0.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards. The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection (if...else) logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too. import mathdef main(): length = int(input("Enter the floor length in feet ")) width = int(input("Enter the floor width in feet ")) numberOfCleanings = int(input("Enter the monthly number of cleanings ")) pricePerSqYrd = 0.45 area = getSqYrds (length, width) charge = printCleaningCost…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…write c++ function named grade_avg that accept two floating point number (i.e grade1 and grade 2)grade avg calculate and returns the average of the two grades if grade1 and grade2 are grater than zero otherwise grade_avg will reture-1.this function value returen avalue of flot type
- Pakistan online Daraz company has four agent (1 to 4) who sell 5 different products ( 1 to5). Once per day, each agent passes in a slip for each different type of product sold. Every agentpasses in between 0 to 5 slips each day. Each slip has the following information on it: The agent number The product number Total rupees of that product sold that day.Write a program in C++ that will read all this information for last month’s sales and brief thetotal sales by agent by product. The output should be in tabular form.Q1) Write a function that will take Bid and ask price in dollars, and a) return dollar bid-ask spread (name the function in_ dollar_bidask ) b) compute proportional bid-ask spread (name the function in_dollar_bidask ) c) Write test code to test a) and b)The Middletown Wholesale Copper Wire Company sells spools ofcopper wiring for $100 each and ships them for $10 apiece. Write aprogram that displays the status of an order. It should use twofunctions. The first function asks for the following data and storesthe input values in reference parameters.The number of spools ordered.The number of spools in stock.Any special shipping and handling charges (above the regular$10 rate).
- Activity 20 Electric Bill: Using Switch Statement, write a program that will calculate and show bills of the Manila Electric Company. The rates vary depending on whether the use is residential (R), commercial( C) , or industrial (I). Any other code should be treated as an error. The program should accept the subscriber ID, Subscriber Name, his total electrical consumption in a month, and the code of the consumer type. The rates are computed as follows: R: 50 plus .50 per kwh used C: 100 for the first 1000 kwh and 0.45 for each additional kwh I: 180 for the first 1000 kwh and 0.75 for each additional kwhIn C++ A carpet company has determined that every 50 square feet of floor coverage will require 6 hours of labor. The company charges $30 per hour for labor. The program should ask for the number of rooms to be carpeted and the price of the carpet per square foot. Write a program uses this method to calculate the total cost: int getArea ( ) should ask for the square feet of floor space in each room, validate it, and return it the value main. This function should be called by main once for each one of the rooms. Display the area to be carpeted, the cost of the carpet, and the cost of labor, and the total cost to the customer. Input Validation: Do not accept a negative value for any data element.Using c++ write the function to find if target is visible to the camera, you may create and use helper functions. struct Vec3{ float x, y, z;};struct Quaternion{ float x, y, z, w;};struct AABB{ Vec3 min, max;};struct SFrustum{// code here};struct SCamera{ Vec3 position; Quaternion rotation; SFrustum relativeFrustum;}; // Function that returns true if target position is visiblebool IsVisible(const SCamera& camera, const Vec3& targetPosition, const AABB* obstacles, size_t numObstacles){// Answer here}
- 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and fertilizer from a local nursery. The nursery carries different types of vegetable fertilizers in various bag sizes. When buying a particular fertilizer, they want to know the price of the fertilizer per pound and the cost of fertilizing per square foot. The following program prompts the user to enter the size of the fertilizer bag, in pounds, the cost of the bag, and the area, in square feet, that can be covered by the bag. The program should output the desired result. However, the program contains logic errors. Find and correct the logic errors so that the program works properly. // Logic errors. #include #include using namespace std; int main() { double costs double area; double bagsize; cout > bagsize; cout > cost; cout > area; cout << endl; cout << "The cost of the fertilizer per pound is: $" << bagsize / cost << endl; cout << "The cost of fertilizing per square foot is: $" << area / cost << endl; return 0; }(Misc. application) a. The data in the following chart was collected on a recent automobile trip: Write a C++ program that accepts a mileage and gallons value and calculates the miles pergallon (mpg) for that segment of the trip. The mpg is obtained as the difference in mileage between fill-ups divided by the number of gallons of gasoline used in the fill-up. b. Modify the program written for Exercise 9a to also compute and display the cumulative mpg after each fill-up. The cumulative mpg is calculated as the difference between the mileage at each fill-up and the mileage at the start of the trip divided by the sum of gallons used to that point in the trip.(Modify) Rewrite the following programs to conform to good programming practice and correct syntax: a. #include using namespace std; int main( ){ cout << “The time has come” ; return 0;} b. #include using namespace std; int main ( ){cout << “Newark is a city\n”;cout << “in New Jersey\n”; cout << “It is also a city\n” ; cout << “in Delaware\n” ; return 0;} c. #include using namespace std; int main() {cout << Reading a program\n”;cout << “is much easier\n” ; cout << “if a standard form for main is used\n” ; cout <<“and each statement is written\n”;cout << “on a line by itself\n” ; return 0;} d. #include using namespace std; int main ( ){ cout << “Every C++ program” ; cout <<“\nmust have one and only one” ; cout << “main function” ; cout << “\n The escape sequence of characters”) ; cout << “\nfor a newline can be placed anywhere” ; cout <<“\n in the message passed to cout” ; return 0;}