I am confused as to what to put for the code lines inFile >> lastname >> firstname >> currentSalary >> percentPayIncrease;. and outFile << firstname << " " << lastname << " " << currentSalary * (1 + percentPayIncrease / 100.00); outFile << endl; my question is would I write the code as is or whould I put the givin values in place i.e. Miller Andrew 65789.87 5?
Q: What will be output of the following c code? #include const enum Alpha { X, Y=5, Z }p=10; int…
A: The output of the following c code is -4 #include<stdio.h>const enum Alpha{X,Y=5,Z}p=10;int…
Q: choose the suitable choice for ternary condition such that x-4 #include using namespace std; int…
A: Program: Generally, a program performs certain tasks according to the instruction given by the…
Q: lease complete the following function printBox, which accepts three parameters (i.e., char c, int…
A: Since programming language not mentioned using C++ CODE: #include <iostream>using namespace…
Q: You want the output to be: one line of vertical bars, spaced so that they always appear above the 0…
A:
Q: Q1: Write code in VB.NET to solution the following : 8 > x2 + 2Y i=0 If output is positive or less…
A: EXPLANATION Below is the program for the given question. Hope you understand it well. If you have…
Q: Please I am facing a problem executing the code The question is:. Write a Flex program to check the…
A: The edited code is given below for the above given question
Q: c# Good day, i am suppose to ask the user for a number i have it assigned to Num1 and then do a…
A: out parameter: C# programming language introduced a new keyword out that is used to pass the…
Q: ite a program InOrder that reads in three different integers and prints the three integers in…
A: In Python we use input function to get input from the user. We can use it like this a = input ("…
Q: Q2) Write code in VB.NET using "do .. while" to solution the following : 14 5 * xy2 i=6 If output is…
A: Code:…
Q: What is the output of the following code? for (var i = 0; i <= 360; i+=60) a. i = 600, 300,…
A: Variable i is initialized to 0. The starting value of i is 0. The for loop condition states that the…
Q: 1. Declare a variable named phone_num and assign value (212)123-5678 to it? 3. How many times the…
A: 1. Declare a variable named phone_num and assign value (212)123-5678 to it answer:…
Q: I am trying to add Windows using setfill(":") and after the code run it is not displaying these…
A: Required: I am trying to add Windows using setfill(":") and after the code run it is not displaying…
Q: A University have decided to provide each employee a personal contact number. But they want to flag…
A: In this question we have to write a shell script where We have to code and identify the category a…
Q: What is the outcome of the following code? int[] a = { 10, 20, 30, 40 }; int[] b = { 50, 60,…
A: int[] a = { 10, 20, 30, 40 }; int[] b = { 50, 60, 70, 80 }; b[3] = a[2]; a[2] = 79;…
Q: Vhat are the values of r0, r1, r2, r3, and r4 (in hexadecimal) after executing the following…
A: Answer is given below-
Q: QUESTION 20 What is the value of y after the following code is executed? Type ERR if you think that…
A: Answer: The value of y will be -5
Q: QUESTION 14 What is the output of the following code segment? s = 6; while(s > 0) if(s % 2 ==1)…
A: Here the while loop will iterate or run untill the condition of loop holds TRUE That is, untill the…
Q: WRITE CODE IN C LANGUANGE At Lili's birthday party, there was a game arranged by Jojo as the host.…
A: 1. input number of test cases 2. run a loop tc number of times 2.1 input x, y and z…
Q: What will be the output of the following C code if the system time is 4:27 PM? #include #include int…
A: In strftime, the passed format specifier is %H which donotes hour in 24 hour format, %p which…
Q: What is the output of the code segment below? int[] arr = {1,2,3,4,5,6,7,8}; for (int yy = 0; yy…
A: Program code: Kindly find the complete Program. //class definitionclass Test{ //main method public…
Q: ? What will be the output of following code ;float x = 5.7.y=30.8 if ( !(x ^y) )
A: code #include<iostream> #include<conio.h> using namespace std;int main(){ float…
Q: Q2) Write code in VB.NET using "do .. while" to solution the following : 14 25+ xy? j=6
A: VB.NET Code using DO .. While loop to print the sum of series.
Q: Three variables, x, y, and z, supposedly hold strings of digits, suitable for converting to…
A: Below is the required python program: - Approach: - Ask the user to enter the value of x, y, and z.…
Q: 16. Consider the following code: ot her = True 1 - int (input (OMumber: )) if other and x > 0: print…
A: Answer: Code: other = Truex = int(input("Number: "))#taking user input#condition checking to print…
Q: What is the output of the following code? Explain. int x = 80000000;while (x > 0) x++;cout…
A: What is the output of the following code? Explain. int x = 80000000;while (x > 0) x++;cout…
Q: You want the output to be: one line of vertical bars, spaced so that they always appear above the 0…
A: the solution is an given below :
Q: What will be the output of the given program? #include using namespace std; void ref(int &a, int…
A: Find the output of the given C++ program.
Q: My program in C++ runs, but does not provide me with my needed ouput, and I cant seem to find my…
A: the retail value is not correct, make it to 199.
Q: Q1: Select the write answer for the following: 1. Which of the following is the preprocessor…
A: Note: we are only allowed to solve three subparts in one question. to get answers to others, please…
Q: How should variables be passed to output subs?
A: The correct answer of the given question is option (c)"Either ByVal or ByRef"
Q: how do I write a code about 2 3-D spheres colliding? It first asks that I have to entire in an x,y,…
A: Approach is to make a class named Sphere overload the '==' and '>' operators over there compare…
Q: Please try to do fast Write the output of the following C++ code? #include using namespace…
A: Que. Write the output of the following C++ code? Ans. Given, Programming language = C++ language…
Q: How do I assign an unlimited amount of number values from user input into malloc and exit the input…
A: According to your question Powerful memory allocation refers to the process of manual memory…
Q: What is the output of the following segment? int y,x = 1, ww = 0,s=3; while ( ++x <= 3 ) { y = x * x…
A: ++x : pre increment ++x: post increment Pre increment operator is used to increment variable value…
Q: Q2) Write code in VB.NET using "do .. while" to solution the following : 14 5 * xy? i=6 If output is…
A: Input : Input x Input y Output : Calculate the given expression value using a do-while loop. If…
Q: (2) Write a Jeva progrom thet prompts the user to enter two integer numbers a ond b. then it…
A: import java.util.*; public class Power{ public static int powerCalc(int a,int b) { if(b==0)…
Q: ming that integer variables A and B are present in your workspace, which condition would make this…
A: if <condition> disp('A is not divisible by B.') end condition is to check whether A is not…
Q: What is the output of the code segment below? for (int s = 1; s 0; t--) System.out.print(t + "…
A: A Java program that has the given statements is as follows, File name: “Main.java” public class Main…
Q: Suppose that the input is 0 8 12 50 7 13 -1. What is the output of the following code? int num, sum,…
A: Program code: //include the required packages #include <iostream> using namespace std;…
Q: In the given code, the values of installment1.dueDate and installment2.dueDate is getting printed…
A: There is a small error of just a 'new' keyword before Date() method and it is fixed by using 'new…
Q: Your objective is to write to write a complete C++ that Prompt the user and store their inputs in…
A: Data types in C++ programming language: The data types are used to store the type of the values and…
Q: This code has a delay in the loop, during which time the user inputs will be ignored. So, please…
A: Answer: We have done code in Arduino and what have done changes my code here i have delay 1 sec and…
Q: The output of the last line is A=2 (B=num2str(A [Ali = ['ali' B .A ali 2 .B 2 .C ???Undefined…
A: Find the required answer with reason and output given as below :
Q: (a) Prompt the user to enter two positive integers n and m (you are not required to handle the case…
A: #include<iostream>#include<math.h>#include<stdlib.h>#include<conio.h>using…
Q: Question What will be the output of following piece of code? System.out.println("The result is "+…
A: I have answered the question in step 2.
Q: 7. What is the assigned (left-hand side) value in each case? int s, m=3, n=5, r, t; float x-3.0, y;…
A: % is mod operator. It gives remainder after division. other mathematical operators are also used…
I am confused as to what to put for the code lines inFile >> lastname >> firstname >> currentSalary
>> percentPayIncrease;.
and outFile << firstname << " " << lastname << " " << currentSalary
* (1 + percentPayIncrease / 100.00);
outFile << endl;
my question is would I write the code as is or whould I put the givin values in place i.e. Miller Andrew 65789.87 5?
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- java application that will allow a user to keep track of the sales of an employee the user should be presented with an option to enter the employee name and the sales amount continuously prompt the user to enter in a sales amount for an employee until a sentinel value of 0 is enteredassign(self, assignment:Assignment) -> AssignmentResult: """ This function is to simulate the process of the student receiving an assignment, then working on the assignment, then submitting the assignment and finally receiving grade for the assignment. This function will receive an assignment then a grade should be calculated using the following formula: grade = 1 - (Student's current energy X Assignment difficulty level). The min grade a student may receive is 0% (0) After the grade is calculated the student's energy should be decreased by percentage difficulty. Example if the student has 80% (.8) energy and the assignment is a difficultly level .2 there final energy should be 64% (.64) = .8 - (.8 * .2). The min energy a student may have is 0% (0) Finally the grade calculated should be stored internally with in this class so it can be retrieved later. Then an Assignment Result object should be created with the student's ID, the assignment…void removeStudent(){System.out.print("\n Enter StudentID to remove: ");long id =sc.nextLong();int pos = searchStudentID(id);if(pos == -1)System.out.println("\n ERROR: No student found having same ID: " + id);elsecourses.remove(pos);} int searchStudentID(long studentID){for(int c = 0; c < students.size(); c++)if(studentID == students.get(c).getId())return c;return -1;} The code is supposed to prompt the user to enter a studentID and if it is in the records then it will be removed, but instead it just prompts me to enter and when i enter the ID, it does not remove the ID (I display the data again after I supposedly removed it but it is still there) and just returns back to the menu. What can I do to correct it?
- void removeStudent(){System.out.print("\n Enter StudentID to remove: ");long id =sc.nextLong();int pos = searchStudentID(id);if(pos == -1)System.out.println("\n ERROR: No student found having same ID: " + id);elsecourses.remove(pos);} int searchStudentID(long studentID){for(int c = 0; c < students.size(); c++)if(studentID == students.get(c).getId())return c;return -1;} The code is supposed to prompt the user to enter a studentID and if it is in the records then it will be removed, but instead it just prompts me to enter and when i enter the ID, it just exits and goes back to the menu. is there something wrong with my code?create a prog that will compute the final grade for a certain student and will display the final grade and a remark if it is passed or failedPass = 75 aboveFailed = 74 belowCS= 60% quiz + 40 assignmentPG =[ 2(Pcs) + PE] / 3TMG = [2(Mcs) +ME] /3MG = [2(TMG) + PG] / 3TFG = Fcs +ME + SFEFG = [2(TFG) + MG ] / 3sample output:enter name of student: Cruzenter quiz Score: 75enter assignment Score: 75enter PE Score: 75PG of Cruz is : 75enter Mquiz Score: 75enter Massignment Score: 75enter ME Score: 75MG of Cruz is: 75enter Fquiz Score: 75enter Fassignment Score: 75enter SFE Score: 75enter FE Score: 75MG of Cruz is: 75FG of Cruz is : 75congrats you PASSstruct Info { int id; float cost; }; Given the struct above, the following code segment will correctly declare and initialize an instance of that struct. Info myInfo = {10,4.99}; Group of answer choices True False ============== Consider the following code fragment. int a[] = {3, -5, 7, 12, 9}; int *ptr = a; *ptr = (*ptr) + 1; cout << *ptr; Group of answer choices 4 -5 3 Address of -5 =============== What will happen if I use new without delete? Group of answer choices The program will never compile The program will never run The program will run fine without memory leak None of these
- Assignment Description This program will simulate part of the game of Yahtzee! This is a dice game that involves rolling five dice and scoring points based on what show up on those five dice. The players would record their scores on a score card, and then total them up, and the player with the larger total wins the game. A Yahtzee score card has two portions: The upper portion has spaces for six scores, obtained by adding up all of the 1's, 2's, 3's, etc. The lower portion has special scores for various combinations: Three of a kind -- at least 3 dice are the same number;the score is the sum of all five dice Four of a kind -- at least 4 dice are the same number;the score is the sum of all five dice Small straight -- four consecutive numbers are represented, e.g. 2345;the score is 25 points Large straight -- five consecutive numbers are represented, e.g. 23456;the score is 30 points Full House -- three of one kind, two of another; the score is 30 points Yahtzee! -- five of a kind; the…Following code in C using random Name Reg no and highschool name Use switch case in C language to do the following: Create a restaurant with the name “Your Name - Reg_No – Name of your highschool” The restaurant should come with the options of delivery and take away and the choice should be displayed as “Delivery – Registration No” and “Takeaway – Name” Each option should have the same menu and an extra 15% charge be included if a customer wants home delivery Both menus should have two items that are customizable, such as a burger can have chillies removed, cheese added and extra mayonnaise. The user should have the option of choosing multiple items with multiple quantity. Print a bill in the end.MadLib Game bigGame.py Write a program that plays a MadLib game with the user. The program should ask the user to enter the following words: A plural noun (PNOUN1) A person’s first name (FNAME) A noun (NOUN1) A person’s last name (LNAME) A second plural noun (PNOUN2) A place (PLACE1) A third plural noun (PNOUN3) Another place (PLACE2) A fourth plural noun (PNOUN4) A second noun (NOUN2) An adjective (ADJECTIVE1) A second adjective (ADJECTIVE2) A verb (VERB) A third adjective (ADJECTIVE3) After the user has entered these items, the program should display the following story, inserting the user’s input into the appropriate locations: Hello there, sports PNOUN1!This is FNAME, talking to you from the press NOUN1in LNAME Stadium, where 57,000 cheering PNOUN2Have gathered to watch (the) PLACE1 PNOUN3take on (the) PLACE2 PNOUN4.Even though the NOUN2 is shining, it’s a/an ADJECTIVE1cold day with the temperature in the ADJECTIVE2 20s.We’ll be back for the opening VERB -off after a few…
- // Declare data fields: a String named customerName, // an int named numItems, and // a double named totalCost.// Your code here... // Implement the default contructor.// Set the value of customerName to "no name"// and use zero for the other data fields.// Your code here... // Implement the overloaded constructor that// passes new values to all data fields.// Your code here... // Implement method getTotalCost to return the totalCost.// Your code here... // Implement method buyItem.//// Adds itemCost to the total cost and increments// (adds 1 to) the number of items in the cart.//// Parameter: a double itemCost indicating the cost of the item.public void buyItem(double itemCost){// Your code here... }// Implement method applyCoupon.//// Apply a coupon to the total cost of the cart.// - Normal coupon: the unit discount is subtracted ONCE// from the total cost.// - Bonus coupon: the unit discount is subtracted TWICE// from the total cost.// - HOWEVER, a bonus coupon only applies if the…Class Quiz public Quiz (int quesList, int quesMissed) {quesList = this.quesList;quesMissed = this.quesMissed;} private void calculate(){// get the point worth of each question and calculate final scorepointsPerQues = (100/quesList);scoreQuiz = quesList - quesMissed;} Class PassFailQuiz public PassFailQuiz (int quesList, int quesMissed, int scoreQuiz) { super(quesList, quesMissed);} How do I move scoreQuiz from private void calculate() to equal the third constructor value in PassFailQuiz?PercentVaR = function(r,alpha){ # This function returns the left tail value and displays a histogram # alpha = risk level. # r = a vector of stock returns # out = positively stated value or r at the 1-alpha percentile hist(r) out = # Get the lower tail value and return it's absolute value return(out) } Please finsh the function in R language