sum and difference of two values) Write the C++ code for a program that allows the user to enter two values. The program outputs the sum of and the difference between the two values.
Q: Systems Design Methodology about errand assistance service application
A: The Answer is in step2
Q: Prove that C = {w|w has an equal number of 0s and 1s} is not regular. Consider the string s=0p1p.
A: Assume that C is regular and p is its pumping length. Let s = 0p1p, hence s ∈ C.Then pumping lemma g...
Q: Write an ALP to perform data transfer between P1.0 to P1.2 at the same time transmit 19BCE0055 seria...
A: ALP (Abductive Logic Programming) is a programming language that is used to solve problems based on ...
Q: Create a procedure for validating the software Encase is working correctly and that the hardware wri...
A: I have answered this question in step 2.
Q: Where are the system journals saved by default?
A: Introduction: With the "auto" option, Journal will be configured to save journal log data in the /va...
Q: Prove that A = {www|w is a string from {a,b}*} is not regular. Consider the string s=apbapbapb.
A: Pumping lemma: It is used to prove that the particular language is not regular. There are two pumpin...
Q: write a program that allows two numbers from the user and prints all the numbers that are multiplica...
A: num1 = int(input("Enter Number 1:"))num2 = int(input("Enter Number 2:")) if(num1>num2): for i ...
Q: Describe an attack against a web cookie-based authentication scheme??
A: Introduction: Allows an attacker to utilise an automated process of trial and error to guess a perso...
Q: e transformed in information
A: NOTE: ACCORDING TO COMPANY POLICY WE CAN SOLVE ONLY 1 QUESTION. YOU CAN RESUBMIT THE QUESTION AGAIN ...
Q: make a flowchart out of this code import pyfiglet class employee: # ASCII ART USING PYFIGLET ...
A: The above program calculates the employee salary based on some calculations. It uses if elif loop t...
Q: You want to calculate the total monthly rental revenue if the rates increase by 5% for the occupied ...
A: Here, i am calculating the total monthly rental revenue if the rates increased by for the occupied a...
Q: What are the four distinct design considerations in a multiprocessor operating system?
A: MULTIPROCESSOR OPERATING SYSTEM Multiprocessor operating systems can be used to boost the perfo...
Q: What influence does data mining have on personal security and privacy?
A: Introduction: Data extraction from data sets can be done using privacy-protected data mining (PPDM) ...
Q: What Role Do Users Play in the Requirements Stage?
A: The role of the customer in the requirements stage of the product development life cycle is critical...
Q: Define two categories of vulnerabilities that are often exploited for each layer in the TCP/IP parad...
A: Understanding TCP/IP: TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a sui...
Q: Explain Moore’s law?
A: The answer is given below:-
Q: Explain how programmable real-time graphics have evolved throughout time.
A: Introduction: The ability to handle interrupts is one feature that distinguishes real-time systems f...
Q: What factors are taken into account when creating a file structure for an operating system?
A: Typically, the different attributes for a file structure are naming, identifier, supported file type...
Q: Instructions employeepay.py 1 # Get the hourly rate An employee's total weekly pay equals hour rate=...
A: just see the below code #code #get the hourly ratehour_rate = float(input("hourly wage:")) #get num...
Q: Draw a Circle that satisfies the following specifications: ▪ Point Size= 16. ▪ X = x_c = 0, Y = y_c ...
A: Draw a Circle that satisfies the following specifications: ▪ Point Size= 16.▪ X = x_c = 0, Y = y_c =...
Q: What does a grey hat hacker accomplish exactly?
A: Grey hat hacker are different from black hat hacker and white hat hacker but not much it exists some...
Q: 4- GIVE ME EXAMPLE FOR NESTED LOOP ?
A: NOTE: As per Bartleby, if there are multiple questions available then we are allowed to solve first ...
Q: When it comes to cloud backup, what is the difference between cloud storage and cloud backup?
A: The above question that is difference between cloud storage and cloud backup is answered in below st...
Q: Discuss the harmful effects of computers and electronic devices on users and suggest possible soluti...
A: answer is
Q: What are necessary conditions which can lead to a deadlock situation in a system?
A: 1.Mutual Exclusion: When two people meet in the landings, they can't just walk through because there...
Q: t is the median of the following list of numbers? [11, 20, 8, 2, 7, 3, 19, 16, 1
A: Arrange the data in ascending order( from smaller to the larger number) 2,3,7,8,11,13,16,17,19,20 Th...
Q: Python) Given the code that reads a list of integers, complete the number_guess() function, which sh...
A: import random def number_guess(i): num= random.randint(1,100) if i< num: printf(i, ...
Q: Computer Science complete these sentences in 30 minutes please The need for computer engineers is...
A: here we have given the solution to complete the sentences in an efficient way. you can find the solu...
Q: a) Write a C+ program that inputs a three digits number from the user and display it in reverse orde...
A: Program using c ++ input value from user and display in reverse order.
Q: Create a subclass Person from an abstract class Name. The Name class has two attributes first name a...
A: public abstract class Name //declaring abstract class{ //declaring attributes private String ...
Q: Describe what makes a mobile app special.
A: There are so many features that make an app special.
Q: What is a palindrome? A palindrome is a string that is the same when read left to right as when read...
A: I have provided C++ CODE along with CODE SCREENSHOT and also provided OUTPUT SCREENSHOT--...
Q: What will be the output of the following Python code? my_dictionary = {"A":40, "B":45} print (40 in ...
A: Dictionaries have a portion of the very like operators and implicit functions that can be utilized w...
Q: A. Draw a data model for the following entities, considering the entities as representing a system f...
A: DATA MODEL The modeling of the data description, data semantics, and data consistency requirements i...
Q: Explain Low-Level Coding
A: We need to explain the Low level coding.
Q: One advantage of a ROUTER is that it can choose the "best" route between networks when there is a ch...
A: Introduction: Here we are required to mention that whether the given statement is true or false.
Q: What to consider to design interfaces for different environments? please help me to write 1 to 2 pa...
A: INTRODUCTION: An interface is a programming framework or syntax that allows a computer to impose sp...
Q: can you tell me the manage mode of adobe?
A: can you tell me the manage mode of adobe?
Q: Describe the functions and responsibilities of a system auditor.
A: Introduction: Conducts information control evaluations on system development standards, operating pr...
Q: Create a copyright definition. Why is it seen as a vial for engineering ethics of practise? State (f...
A: Copyright refers to the legal right of the owner of intellectual property. In simpler terms, copyrig...
Q: Why is virtual memory not used more frequently in embedded systems?
A: Introduction: The technology necessary to convert virtual addresses to physical addresses often take...
Q: What exactly is data profiling, and how does it improve data quality?
A: Introduction: Material profiling is a strategy for evaluating existing news sources and developing s...
Q: oday's TCP implementations employ PRNGs to generate session start sequence numbers. So, with just th...
A: Given that, In this modern world, TCP implementations employ pseudo-random number generators(PRNGs) ...
Q: 2. For this problem consider the Average problem stated below. Average Input: A sequence of n intege...
A: Given The answer is given below. Answer:- a)Algorithm to solve average problem using the 'For' loop ...
Q: Is It Possible To Make Cfg For Infix And Post-fix Expression’s Using Derivation Tree ?
A: Introduction: Is It Possible To Make Cfg For Infix And Postfix Expression’s Using Derivation Tree?
Q: Question 1-Briefly explain what steps need to be completed to install WordPress? Question 2-To devel...
A: Answer 1:- Step 1: Download WordPress. Download the WordPress package to your local computer ...
Q: Design DFA for the following over {a,b} (i) All strings containing not more than three a's.
A: Given: (i)L= All strings containing not more than three a's over {a,b} Logic to Build DFA for L: -si...
Q: Q5: For the Binary search tree given below. 30 15 60 7 22 45 75 17 27 In-order Travetrsal Pre-Order ...
A: In-order Traversal In Inorder traversal, the root is traversed in between the left and right subtre...
Q: Complete the code where it says Your code here. When you are done enter ONLY the code you added in t...
A: Algorithm: 1.Include header files 2.Read prefix and sufix 3.Print the ouput as required 4.end
Q: Implement the Boyer Moore algorithm from scratch. Test it and plot c against n and m where n is the ...
A: In computer science, pattern search is a critical problem. Pattern searching methods are used to dis...
C++ Programming Exercise 2
C++ Programming Exercise 2 #1
- Name your C++ source code file: C++PE2-1.cpp
(sum and difference of two values) Write the C++ code for a program that allows the user to enter two values. The program outputs the sum of and the difference between the two values.
C++ Programming Exercise 2 #1 screenshot of C++ source code and run
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- C++ Visual 2019 A file called num.txt. write a C++ program that opens a file, reads all the numbers from the file and calculates the following: The number of numbers in the file The sum of all the numbers in the file (a running total) The average of all the numbers in the file The program should display the number of numbers found in the file, the sum of the numbers and the average of the numbers. These are the numbers in the num.txt file :…C++ Programming Exercise 2 #2 Name your C++ source code file: C++PE2-2.cpp (hours worked five-day week and 252-day work year) Write the C++ code for a program that allows the user to enter a value for hours worked in a day. The program calculates the hours worked in a five-day week and the hours worked in a 252-day work year. The program outputs all the results. C++ Programming Exercise 2 #2 screenshot of C++ source code and runC++ A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee's weekly pay and the average salary of all the workers. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40 hours, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees, and a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week, the hourly pay rate, and the weekly pay. Your program must contain at least the following functions—a function to read the data from the…
- C++ Programming Write a C++ program using file handling in which it will read the code from the text file and then display the syntax errors in the output.C++ A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee’s weekly pay and the average salary of all employees. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees (Name) a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week (Hrs Worked), the hourly pay rate (Pay Rate), and the weekly pay (Salary). Your program must contain at least the following functions: a…Exercise 3 – Roman Numerals Exercise Tasks: Create a visual studio C++ project exercise3 and submit the cpp file when completed Create a C++ program that converts integers between 1 and 3999 into the corresponding roman numerals. Your solution should print an error message for incorrect input. The following roman numeral conversions should prove useful: 1. I 6. VI 50. L 900. CM2. II 9. IX 90. XC 1000. M4. IV 10. X 100. C 5. V 40. XL 500 D. Modify the following tester code to obtain an integer from the user and check that it is between 1 and 3999. Then print out the corresponding roman numerals. While the sample code uses an ifthenelse, you could also use a switch statement. /****************************************************** * Roman Numeral Converter August 13 * converts base 10 positive integer >=0 <4000 to roman numerals * @author <your name here> */ #include <iostream> using…
- Instructions C++ 8-17 A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee’s weekly pay and the average salary of all employees. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees (Name) a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week (Hrs Worked), the hourly pay rate (Pay Rate), and the weekly pay (Salary). Your program must contain at least the following…Overview In this assignment you will create user-defined functions OUTSIDE the main program and call those functions from INSIDE the main program. Instructions This assignment will require you to create functions in the program which the main procedure calls. Write a C++ program that Reads data from an input file. The data file should include 10 students. Each student should have Takes the data and computes student grades for an assignment by converting the raw score to a percentage given each student's score and the total points. Round the final score up to the nearest whole value using the ceil function in the <cmath> header file and displayed as a percentage. You must also display the floating-point result up to 5 decimal places. You must use at least 2 functions: one to print the last name of the student and another function to compute and print the percentage as well as "Excellent" if the grade is greater than 90, "Well Done" if the grade is greater than…C++ A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employ- ee’s weekly pay and the average salary of all the workers. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees, and a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week, the hourly pay rate, and the weekly pay. Your program must contain at least the follow- ing functions—a function to read the data from…
- USING C++ PLEASE CREATE THREE FILES! NumberGuesser.h: NumberGuesser class definition NumberGuesser.cpp: NumberGuesser class implementation main.cpp: main program to run the game using your NumberGuesser class, including sample output at the bottom Each time that the program guesses a number the user responds by telling the program either the correct answer is higher or lower, or that the program’s guess is correct. A sample run of the program is printed below. In the example the user picks the value 72 for the first game, and then 25 for the second game. The user's input is in bold. Here is how the output might look: > Think of a number between 1 and 100> Is the number 50? (h/l/c): h> Is the number 75? (h/l/c): l> Is the number 62? (h/l/c): h> Is the number 69? (h/l/c): h> Is the number 72? (h/l/c): c> You picked 72? Great pick.> Do you want to play again? (y/n): y> Think of a number Between 1 and 100> Is the number 50? (h/l/c): l> Is the number 25?…Help me homework c++ The shots file holds a list of shots (imagine some hitscan weapon in a video game like a shotgun or something). Each shot has an origin and a direction. The origin is an (x,y) coordinate, like (5,3). The direction is a slope and whether the shot is traveling along that slope or in the reverse. A slope of "Vertical" means that the shot is travellingstraight up and down. The format is:x_location y_location slope(either a number like 2.1 or a non-number meaning"Vertical") forwards(1 meaning forwards, 0 meaning backwards) 0 0 0 00 0 0 10 0 Vertical 00 0 Squirrel 110 10 -1 1-10.1 -100.01 2.1 0 The first line is a horizontal line shooting left from the origin (0,0).The second line is a shot also travelling horizontally from the origin, but forward along the x axis instead of backwards.The third line is shooting straight down out of the originThe fourth line is shooting straight up out of the origin (any non-number means Vertical, not just Vertical)The fifth line is…C++ Programming I Program 4: C++ Craps Game Functions in files, random numbers , stringstream and precision Craps is a popular dice game played in casinos. The C++ variation is as follows: Make a bet. Roll two dice. Each die has six faces, representing values 1-6. Check the sum of the faces showing on the two dice.: If the sum is 2, 3 or 12 (craps), you lose. If the sum is 7 or 11 (natural), you win. If the sum is anything else, a point is established (the sum of the dice you rolled) and you continue to roll until you re-roll the point (you win) or you roll a 7 (you lose). This program will contain 6 functions to be called from main and from another function. The functions will be contained in two files: Functions.h, which contains the function prototypes, and Functions.cpp, which will contain the function implementations (or bodies). Do not forget to put include guards in the Functions.h file. Begin the program by declaring variables…