C++ program The error The correction #include using namespace std; int main() { /*Program to calculate the annual bonus for the employee*/ double salary; constant double commotion =350; cout<<"please enter your salary"<<"endl"; cin>>salary; salary=+commotion; cout<<"salary="<
Q: Write a function to calculate the sum of all numbers from 1 to a given number x y = 1 +2 + 3 + ... +...
A: Python Code for above : def sumOfDigitsFrom1ToN(n): return n * (n+1) / 2 # call functionpr...
Q: Exceptions are ... Solec+
A: Option b exception handling is the process of responding to the occurrence of exceptions – anomalou...
Q: Python Programming. Write a program that computes how much a customer has to pay after purchasing...
A: According to the information given:- We have to follow the instruction mentioned to get the desired ...
Q: Discuss the web's requirements and characteristics.
A: Introduction Discuss the requirements and qualities of the web.
Q: What exactly is technical documentation? What are the four main distinctions between technical docum...
A: Documentation Techniques The phrase "technical documentation" refers to a variety of publications th...
Q: When it comes to iOS, what is the difference between the IPA and.am extensions?
A: In this question we have to discuss about the IPA and .am extensions First we will look into what bo...
Q: Implement a function readEmpFromFile that takes a FILE * as the only argument and returns a pointer ...
A: Solution:: Step 1 #include <stdio.h> #include <stdlib.h> #include <string.h> #...
Q: In Linux, what is the purpose of the repquota command? Explain. What makes this command distinct fro...
A:
Q: planation and demonstration of the roles of the ACTION and METHOD attributes as they are applied to ...
A: Lets see the solution.
Q: What role do people play in information systems, and how significant are they?
A: Introduction: In almost every aspect, people are involved in information systems. People design, bui...
Q: Give examples of six different process technologies that are utilized for programmable connections i...
A: Introduction: A programmable logic device (PLD) is a kind of electrical component that enables the c...
Q: Can you apply the Topic Modeling on Sentiment Analysis (Twitter Data)? show detailed steps with Pyth...
A: Pipeline 1: Batch processing and topic modelling In this part, we used tweepy to extract tweets from...
Q: readEmpFromFile
A: Programming is given below.
Q: Create a class named "Manager". This class has two private attributes: Salary, Address. You want to ...
A: Below is the program implementation for above question in Java. NOTE: The main method acts as driver...
Q: ticular jurisdiction, taxi fares consist of a base fare of $4.00, plus $0.25 for every 140 meters tr...
A: Lets see the solution.
Q: Explain the purpose of the I/O instructions IN and OUT.
A: The I/O instructions of the 8085 provide access to the processor's I/O ports. It allows for the tran...
Q: What are the returned values of the following commands? >>rc_wait=wait(NULL); >getpid(); > write(fil...
A: As per our guidelines we are supposed to answer only three sub part of a question so post the other ...
Q: Why wouldn't a game based only on run-length encodings be difficult?
A: Run-length encoding is a form of data compression in which a stream of data is given as the input (i...
Q: TensorFlow ParameterServerStrategy in order to see how the general structure of the code looks like....
A: Example code for coordinator This section provides code snippets that are intended to be run on (the...
Q: at is the normal relationship between an untrusted network, a firewall, and a trusted network, and h...
A: Lets see the solution.
Q: When installing new software, one of the most important factors to consider is the hardware.
A: Software Installation : The Installation process for software or apps depends on your operating syst...
Q: Make a mental image of a virtual machine.
A: Intro EXPLANATION : VIRTUAL MACHINE: A software-based system with its operating system on a host se...
Q: The Municipality of Muscat collects and retains a large amount of information on its everyday operat...
A: Introduction: Master data incorporates information from the Muscat Municipality's many departments, ...
Q: Machine Learning: Discuss clusters as the goal is to group similar instances together into clusters...
A: let us see the answer:- Introduction:- Clustering, often known as cluster analysis, is a machine lea...
Q: Write a complete Java program that provides two methods named sortList(ist) and lastindexof(list, ta...
A: import java.util.*; public class Main{ public static void main(String[] args) { Scanner in=new S...
Q: Write a C++ program to take an array of ints, print true if the sequence of numbers 1, 2, 3 appears ...
A: 1) Below is C++ program to take an array of ints , print true if the sequence of number 1, 2, 3 appe...
Q: List two benefits and two drawbacks of having worldwide network protocol standards.
A: Intro List two benefits and two drawbacks of having worldwide network protocol standards.
Q: Given an ordered array of n elements, partition the elements into two arrays such that the elements ...
A: We have an ordered array of n elements. We need to write a program that will make a partition of thi...
Q: What logic programming languages are appropriate for which tasks? Relational Database Management...
A: Introduction: Languages for logic programming are used for
Q: Journal articles with full-page format/imaging (PDF) are referenced in the same way as printed journ...
A: Journal article is the original research format is suitable for many different fields and different ...
Q: Let's say you want to create a WebGL software that draws two types of objects: sparkly billiard ball...
A: Introduction: This article will cover the fundamentals of using the canvas> element to render Web...
Q: When should a network designer use static or dynamic VLAN?
A: Introduction When should a network designer utilize static VLAN and dynamic VLAN?
Q: M1 - np.array (I [12,7,3], [4 ,5,6], [7,8,9] ]) M2 - np. array(( [1,0,01, [0,1,0], [0,0,1] 1) result...
A: Here as per python code, draw flowchart as per my knowledge. i hope you like it.
Q: Computer Science Part 2: Client Program with ArrayList Create a second client program. This program ...
A: Program: import java.util.ArrayList;import java.util.Random;import java.util.Scanner; class StudentG...
Q: What is a transaction
A: Please refer below for your reference: Generally, a transaction can be defined as a group of tasks. ...
Q: What will be the designer's initial task?
A: Introduction: If you are a web designer or UI/UX designer, the following are frequent topics to cons...
Q: Discussion what makes Extra-Trees more random than regular Random Forests? How can this extra random...
A: 1. Extra Trees uses the entire original sample, whereas Random Forest uses bootstrap replicas, which...
Q: What is one intriguing use of data or text mining that you can research and describe?
A: Text mining: Text mining, otherwise called text information mining, is the method of separating gr...
Q: Alice signs the hash of a message. Suppose her hash function satisfies h(x) = 2ª (mod 101) and 1< h(...
A: Hash function: Hash function appeared in all information security application. It is a mathematical ...
Q: True or false? Justify. (a) 25mod11=3 (b) 3mod25=11 (d) 25≡11 (mod3) (e) 3≡25 (mod11) (c) 11mod3=25 ...
A: Answer the above questions are as follows:
Q: What is the normal relationship between an untrusted network, a firewall, and a trusted network, and...
A: Introduction: Because of powerful firewalls, computers on trusted networks are more safe and secret....
Q: Given the fact that the globe is running out of IP addresses, what is likely to happen with IP addre...
A: Introduction: From small to big businesses, there were often more computers than IP addresses availa...
Q: For this exercise you are going to write a program that will allow you to accept and load different ...
A: import csv from datetime import datetime from matplotlib import pyplot as plt def get_weather_data(f...
Q: Write down the MATLAB expressions that will correctly compute the following: a. cot(t) 2 b.sec (t) +...
A: Answer the above questions are as follows:
Q: You have to take a string, print 1 if the first instance of "s" in the string is immediately followe...
A: ALGORITHM:- 1. Declare and initialise a string. 2. Traverse through the string and check the conditi...
Q: Is it possible to buy software? If so, what are the various methods of obtaining software?
A: Introduction: A corporation may either create or buy software. In certain circumstances, acquired s...
Q: Investigate the internet for one incident of a security breach that occurred in connection with each...
A: The Alberta Motor Association filed a major complaint against the former Vice President of Informati...
Q: : write an algorithm and draw a flowchart to input and display the sum of 20 Integers.
A: Algorithm: An algorithm contain set of steps helps to understand how to develop a program. It is eas...
Q: The question is, how do you handle security in an office that has shared resources, such as a printe...
A: Introduction: Resources that may be accessed by several distant computers linked via a local area ne...
Q: iscuss the functionality of Disk Provisioning Architecture in the Cloud computing model in de
A: Lets see the solution.
Detect the errors in the following C++
Step by step
Solved in 3 steps with 2 images
- In C/C++, True or False: A variable's type helps define the range of values that can be held by that type. A variable's type helps define the operations that can be performed on that type. A parameter that has a default value must be the first parameter listed in the function's parameter list.Module/Week 7 ASSIGNMENT (ARRAYS)Use functional decomposition to write a C++ program that asks the user to enter his or her weight and the name of a planet. Use an enumerated type called planetType to represent the planets and use a switch statement that takes as its condition a planetType variable. The program, via the switch statement, then outputs how much the user would weigh on that planet. The following table gives the factor by which the weight must be multiplied for each planet. Your program must have the following functions in it: GetUserInput(), ConvertInputToPlanetType(), and OutputWeight() (your switch statement must be in OutputWeight()). I will let you determine what each function’s parameters and return types should be. The program will output an error message if the user does not type a correct planet name. The prompt and the error message will make it clear to the user how a planet name must be entered. Use proper formatting and appropriate comments in your code. The…Module/Week 7 ASSIGNMENT (ARRAYS)Use functional decomposition to write a C++ program that asks the user to enter his or her weight and the name of a planet. Use an enumerated type called planetType to represent the planets and use a switch statement that takes as its condition a planetType variable. The program, via the switch statement, then outputs how much the user would weigh on that planet. The following table gives the factor by which the weight must be multiplied for each planet.Your program must have the following functions in it: GetUserInput(),ConvertInputToPlanetType(), and OutputWeight() (your switch statement must be in OutputWeight()). I will let you determine what each function’s parameters and return types should be. The program will output an error message if the user does not type a correct planet name. The prompt and the error message will make it clear to the user how a planet name mustbe entered.Use proper formatting and appropriate comments in your code. The utput…
- C++ Programming Exercise: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first month's interest on $1,000 is 1000 X 0.006 = 6. Becuase the payment is $25 and the interest of the first month is $6, the payment toward the principal amount is 25-6 = 19. This means after making the first payment, the loan amount is 1,000-19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 X 0.006 = 5.886,…H1. A value returning function executes its statements and then returns a value. true or false Explain with details also explain wrong optionC++ PROGRAMProblem Statement: A 4th grader is having trouble with Permutation and Combination problem in Mathematics, so a friend offered help to create a program they can use. The program contains 3 options, 1st option is for Permutation, 2nd option is Combination and 3rd is for terminating the system. For option 1, Permutation, they uses the following formula: nPr = ; where r must not be greater than n. It should not proceed if this condition is not met. For 2nd option, Combination, they uses the formula : nCr = ; where r must not be greater than n as well. For the 3rd option, the program owner’s information shall be displayed, like name, subject code and account number, before the program terminates. Requirements: Develop the required system and use cpp for the file name Remember that both n and r are variables, their values shall only be entered at run time. The program requires the use of any looping The program requires the use of any conditional Introduce at…
- Language C++ It has been observed by management that some faculty member at the university demonstrates a lackadaisical attitude toward teaching. They seldom go to class yet at the end of each month they receive full salary. Management has decided that GHs 200, 300, 400, and 500 will be deducted from a faculty’s salary if he/she offends once, twice, third time and forth time respectively in a month. This means that if a faculty member offends once in a month GHs 200 will be deducted, if a faculty member offends twice in a month, GHs 500 (i.e. 200+300) will be deducted, if a faculty member offends three times in a month GHs 900 (i.e. 200+300+400), will be deducted and if a faculty member offends four times in a month GHs 1,400 (i.e. 200+300+400+500). Assuming all faculty members are on a flat salary rate of GHs 2000. a. Write a program to request for the names of four faculty members and number times he/she has absented him/herself from class. One of them should have absented…C++ HELP! Please help, this question was rejected for complexity but I really don't have any one else to ask! I would really like to see what I got wrong so if anyone can solve this please help!Write a complete C++ program with the following: A struct named Car with member variables to store car make, model, and price. A function named setCar that returns a Car and has no parameters. setCar will:prompt the user for a car name, model, and price, and return that car. A void function named showCars with 2 parameters: a constant Car array named cars, and a constant integer named SIZE. The showCars function will:Use a loop to display the make, model, and price of each car in the cars array, and will also display what that car’s position is in the array (for regular computer users who start counting from 1, not programmers who start counting from 0). In the main functionDeclare a constant integer named SIZE with the value of 3.Declare a Car array the size of SIZE. Write a loop to call your…C++ Functions provide a means to modularize applications Write a function called "Calculate" takes two double arguments returns a double result For example, the following is a function that takes a single "double" argument and returns a "double" result double squareArea(double side){ double lArea; lArea = side * side; return lArea;}
- 1.Define a struct, checkingAccount, to store the following data about a checking account.account holder’s name (string), account number (int), balance (double),and interest rate (double). Assume the definition in No. 1. Declare a checkingAccount variable and write a C++ statementsto store the following information: account holders’sJAVA CODE PLEASE Functions With No Parameters and Return Values Practice ll by CodeChum Admin Create a program that has a global integer variable assigned to a value of 1. Then, create a new function named increment that increments the global variable. In the main function, if the current value of the global variable is divisible by 3, print “Cody!”. Otherwise, print the value of that global variable. Repeatedly call the increment function until the value of the global variable is greater than 15. Output Multiple lines containing a string or an integer 1 2 Cody! 4 5 Cody! 7 8 Cody! 10 11 Cody! 13 14 Cody! Score:done in c++ Program Specifications: Write a program that asks for a user's name and age, finds the ticket price based on the age, and prints out the user's name, age, and ticket price. The program must define the following 3 functions and call them in the main function. Create a function called getName that takes in no arguments and returns the name of the user. Create a function called getAge that takes in the argument age and uses pass-by-reference to set the age of the user. Ensure that the user cannot put in an age that is negative or greater than 100. Create a function called printTicket that takes in the user's name and age and does the following ○ If they are less than or equal to 13 years old set ticket_Price to 9.99. ○ If their age is greater than 13 and less than 65, set ticket_Price to 19.99. ○ If their age is greater than or equal to 65, set ticket_Price to 12.99. ○ Output to the console the user's name, age and ticket price.