-) Write a complete C++ program that takes the users' weight and their lifestyle as an input and recommends the number of calories they should take per day. Your program needs to take users' weight as an integer value and their lifestyle as a character that shows if they are active (a) or sedentary (inactive) (s). Your program then calculates the number of calories by multiplying the users' weight with the activity factor. If the person is sedentary, that person's activity factor is 13. If the person is active, that person's activity factor is 15. Sample Run Please enter your weight: 60 Do you have an active (a) or sedentary (s) lifestyle? s The recommended number of calories: 780
Q: Output is nearly correct, but whitespace differs. See highlights below. Special character legend…
A: Below is the complete solution with explanation in detail for the given question about the…
Q: Discuss the concept of load balancers and their role in distributing network traffic across servers.…
A: In the realm of modern networking, ensuring seamless and efficient distribution of network traffic…
Q: Define the concept of instruction pipelining in computer architecture. How does it improve CPU…
A: Instruction pipelining is a fundamental concept in computer architecture that aims to improve the…
Q: Discuss the concept of nested virtualization and its use cases. What are the challenges associated…
A: Virtualization is a computing method that allows many virtual environments or dedicated resources to…
Q: What is the role of virtualization in cloud computing, and how does it enable the efficient use of…
A: Virtualization technology helps companies apply a cloud-based service delivery model to their…
Q: Fordley Car Park is open between 7am and 9pm every day. They charge £2.30 per hour with a minimum…
A: The answer for question a. Is given below in detail.Note : As per bartleby guidelines if multiple…
Q: How does speculative execution relate to pipelining, and what are its implications in modern…
A: Speculative execution and pipelining boost microprocessor speed in current architectures. They are…
Q: C++ Using Ranged Loops and Vectors, prompt the user to enter the name of the Bill into a String…
A: In this question we have to write a C++program whereLet's understand and hope this helps, If you…
Q: Identify and describe the primary functions of devices operating at the Physical Layer of the OSI…
A: The Physical Layer is the first layer of the OSI (Open Systems Interconnection) model, which is a…
Q: Discuss the concept of dynamic scheduling and the role of reservation stations in out-of-order…
A: 1) Out-of-order pipelines are a type of processor architecture that allows instructions to be…
Q: e roles and functionalities of intrusion detection systems (IDS) and intrusion prevention systems…
A: In today's cybersecurity landscape, protecting networks and systems from threats is paramount.…
Q: Discuss the concept of simultaneous multithreading (SMT) and its impact on pipeline design and…
A: Simultaneous Multithreading (SMT), also known as Hyper-Threading in Intel terminology, is a…
Q: H1. The two workstations must be connected to a network hub using patch cables that will connect to…
A: In the realm of networking, ensuring the proper configuration and length of cables is critical for…
Q: The program in this solution does not appear the same for RStudio or R program and my output…
A: Procedure Involved in this :Load the necessary libraries: dplyr, lubridate, stringr, and…
Q: Using a selection structure generate the Magic8Ball main() method body, in a java program that…
A: The user requested a Java program with a `main()` method that simulates the Magic 8 Ball, a…
Q: Discuss the operation of a firewall in the context of the OSI model and its role in network…
A: Firewalls are a part of network security serving as a barrier between trusted networks and…
Q: In the context of out-of-order execution, discuss the benefits and challenges associated with…
A: Out-of-order execution is a CPU plan procedure that permits a processor to execute instructions in…
Q: Explore the intricacies of load balancers and their role in optimizing network traffic at the OSI…
A: Load balancers are critical network devices or software components used to distribute incoming…
Q: I'm doing a study using the RStudio app on air quality in New York City. Looking at Temp…
A: For the given study on air quality, the variables are:Temp (numerical)CO2 (numerical)O3 (numerical)…
Q: Explain the concept of data hazards and control hazards in pipelining. How are these hazards…
A: In computer and microprocessor design, pipelining is a technique used to increase the speed and…
Q: Explore the concept of serverless computing and its relationship with virtualization. How do…
A: Cloud computing, known as serverless computing, maintains the infrastructure and automatically…
Q: How does hardware virtualization differ from software virtualization, and what are some use cases…
A: With the aid of a hypervisor, several virtual machines (VMs) can be created and managed on a single…
Q: What is the impact of pipeline flushes and stalls on CPU performance, and how are they managed?
A: A pipelined CPU's performance may be affected by pipeline flushes and stalls during execution. When…
Q: the concept of nested virtualization. In what scenarios is it beneficial?
A: The idea of nested virtualization has become a potent tool in the dynamic world of virtualization,…
Q: How does branch prediction work in pipelining, and why is it essential for maintaining pipeline…
A: Pipeline efficiency is a measure of how effectively a pipeline is utilized in a computer processor.…
Q: Explain the concept of load balancing in the Application Layer (Layer 7) of the OSI model. How do…
A: The Open Systems Interconnection model is a guideline for determining how applications should…
Q: Describe in-order and out-of-order execution in pipelining and their respective advantages.
A: In-order execution processes instructions sequentially, adhering to the order they are fetched,…
Q: Explain the concept of speculative execution and the potential security risks associated with it, as…
A: Speculative execution is an exhibition streamlining strategy utilized by present day microprocessors…
Q: Discuss the use of virtualization in cloud computing. How does virtualization enable resource…
A: Virtualization is a technology, in cloud computing that greatly enhances resource optimization and…
Q: Explain nested virtualization and its practical applications. What are the potential use cases in…
A: Nested virtualization is a technology that enables the operation of machines (VMs), within…
Q: Explain the role of bridges and switches in the Data Link Layer of the OSI model. How do they differ…
A: The Data Link Layer, the second layer in the OSI model, plays a crucial role in ensuring the…
Q: ain
A: In the evolving world of digital communication and data transfer, the efficiency and speed at which…
Q: Explore the challenges of managing and securing virtualized environments in a multi-cloud or hybrid…
A: Managing and securing virtualized environments in a cloud or hybrid cloud architecture comes with…
Q: Specifically think of and give a real-life scenario where: Computer graphics improve the movie…
A: Over the past half-century, the field of computer graphics has undergone a remarkable evolution,…
Q: Explain the concept of dynamic scheduling and speculative execution in pipelining and their…
A: Let us start by understanding scheduling and speculative execution which are advanced techniques…
Q: Discuss the security challenges associated with virtualization and the strategies used to mitigate…
A: A single physical server or host system can support many virtual environments, such as virtual…
Q: Having knowledge of number of entities as well as the physical size of the database? a. Database…
A: Database design is the process of defining the structure, organization, and relationships between…
Q: Discuss the role of network monitoring and packet capture devices, such as Network TAPs, in…
A: These hardware or software tools, sometimes known as packet sniffers or network analyzers, are used…
Q: Discuss the role of software-defined networking (SDN) in virtualized environments. How does SDN…
A: The control plane and the data plane within networking devices and systems are separated by…
Q: How do devices at the Application Layer (Layer 7) of the OSI model, such as proxies and load…
A: Proxy servers and load balancers are examples of devices found at the Application Layer (Layer 7) of…
Q: What does this mean 2. The information below includes what was sent by the academic advisor…
A: The program checklist for the York University BSc Honours in Computer Science offers a comprehensive…
Q: Analyze the security implications and challenges of virtualization in cloud computing environments.
A: Virtualization is a key technique in cloud computing, allowing for resource efficiency, scalability,…
Q: Discuss the responsibilities of routers in the OSI network layer. How do routers facilitate…
A: Routers play a vital role in the OSI (Open Systems Interconnection) model, particularly in the…
Q: Object-Oriented Programming (Please do not use AI) Create a Java program that has the following:…
A: Start.Define an abstract class Animal with a name field and a totalAnimals static variable to count…
Q: Explore the concept of Layer 8 (the political layer) in the OSI model and its relevance in…
A: In the traditional OSI (Open Systems Interconnection) model, which is a conceptual framework for…
Q: How does a router function in a network, and which OSI model layers are affected by routing?
A: A router plays a crucial role in computer networks, ensuring data packets are efficiently directed…
Q: Soon after you start the investigation, it becomes apparent that you will need to involve the…
A: In the course of any investigation, the involvement of a digital forensic expert is sometimes not…
Q: How does virtualization impact network performance and scalability in a software-defined network…
A: Virtualization is a fundamental technology in software-defined networks (SDNs), which decouple…
Q: What devices operate at Layer 2 (Data Link Layer) of the OSI model, and how do they facilitate data…
A: The Data Link Layer, which operates at Layer 2 of the OSI (Open Systems Interconnection) model, is a…
Q: Discuss the challenges and techniques involved in achieving branch prediction accuracy in pipelined…
A: An aspect of designing computer architecture is achieving branch prediction in pipelined…
![-) Write a complete C++ program that takes the users' weight and their lifestyle as an input and
recommends the number of calories they should take per day. Your program needs to take users' weight as an
integer value and their lifestyle as a character that shows if they are active (a) or sedentary (inactive) (s). Your
program then calculates the number of calories by multiplying the users' weight with the activity factor. If the
person is sedentary, that person's activity factor is 13. If the person is active, that person's activity factor is 15.
Sample Run
Please enter your weight: 60
Do you have an active (a) or sedentary (s) lifestyle? s
The recommended number of calories: 780](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F4b3629ba-4579-40ab-9aee-4c88e15e68a8%2F23eeb4ef-ac50-4a40-b74a-96e7b088a5f4%2Fimxelyb_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- Pass the marks of 3 tests (Test1, Test2 and Test3) to the function with header high (float, float, float). Write a Function which should return the highest marks scored in the test. Use C programming language to solve this question.Write a C++ program to calculate a rectangle's area. The program consists of the following function: getLength - This function should ask the user to enter the rectangle's length. and then returns that value as a double • getWidth - This function should ask the user to enter the rectangle's width. and then returns that value as a double. • get Area - This function should accept the rectangle's length and width as arguments and return the rectangle's area. • displayData - This function should accept the rectangle's length, width and area as arguments, and display them in an appropriate message on the screen. main - This function consists of calls to the above functions.Written in C# Language Please! A fixed percentage of water is taken from a well each day. Request values for W and P where: ▪ W is the amount (in litres) of water in the well at the start of the first day ▪ P is the percentage of the water in the well taken out each day Write a program to print the number of the day, the amount taken for that day and the amount remaining at the end of the day. The output should be terminated when 30 days have been printed or the amount of water remaining is less than 100 litres, whichever comes first. For example, if W = 1000 and P = 10, the output should start as follows: Day Amount Taken Amount Remaining 1 100 900 2 90 810 3 81 729 Note: The amount taken and amount remaining should be displayed to 2 decimal places.
- Write a C++ program that helps calculate how long it would take a user to pay off a loan with compound interest. You should prompt the user for the principle amount, how much interest is being charged, and how much they are able to pay back each month. You should assume that all amounts are in dollars and cents, that interest is charged monthly, and that payments are also made monthly. The program should display a table with the following columns: the month number, the amount remaining on the loan, and the total amount already paid. For *each* row, you should: 1. *FIRST* subtract the payment from the amount remaining on the loan.2. *THEN* add interest based on this new total amount. You should continue to print out rows in the table until either the amount remaining is <= $0 or if 100 months have passed. Then, print out a summary showing the number of months that will elapse and how much total has been paid. If the table stops at 100 months, print out a message telling the user that…Write a C++ Program for the given instructions: Instructions Write a program to implement the algorithm that you designed in Exercise 19 of Chapter 1. Your program should allow the user to buy as many items as the user desires. Instructions for Exercise 19 of Chapter 1 have been posted below for your convenience. Exercise 19 Jason typically uses the Internet to buy various items. If the total cost of the items ordered, at one time, is $200 or more, then the shipping and handling is free; otherwise, the shipping and handling is $10 per item. Design an algorithm that prompts Jason to enter the number of items ordered and the price of each item. The algorithm then outputs the total shipping and handling fee, and the billing amount. Your algorithm must use a loop (repetition structure) to get the price of each item. (For simplicity, you may assume that Jason orders no more than five items at a time.)Write a C++ program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: void getScore() should ask the user for a test score, store it in a reference param- eter variable, and validate it. This function should be called by main once for each of the five scores to be entered. void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main and should be passed the five scores. int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. **DO NOT USE AN ARRAY OR GLOBAL VARIABLES!!!*** YOU MUST USE THE STATED FUNCTIONS. AND INPUT VALIDATION. For FULL CREDIT DISPLAY THE LOWEST SCORE WITH GOOD OUTPUT DESCRIPTION you MUST USE function prototyping.. DO NOT ACCEPT SCORES LESS THAN 0 OR GREATER THAN…
- write a C++ program. Write a program that calculates and displays the average of a group of test scores, allintegers, after the lowest score in the group has been dropped. There are six testscores in the group. The program must contain only the following functions in additionto the main:• void getScore should ask the user for a test score, store it in a referenceparameter variable, and validate it. This function should be called by the mainfunction once for of the six scores to be entered by the user.• double calcAverage should calculate and return the average of the five highestscores. This function should be called just once by the main function, and shouldbe passed the six scores. Use pass by reference to receive the lowest test score.• int findLowest should find and return the lowest of the six scores passed to it. Itmust be called by the calcAverage function, which uses it to determine which ofthe six scores to drop.• void displayResults should be called by the main function to…write a C++ program. Write a program that calculates and displays the average of a group of test scores, all integers, after the lowest score in the group has been dropped. There are six test scores in the group. The program must contain only the following functions in additionto the main:• void getScore should ask the user for a test score, store it in a referenceparameter variable, and validate it. This function should be called by the mainfunction once for of the six scores to be entered by the user.• double calcAverage should calculate and return the average of the five highest scores. This function should be called just once by the main function, and should be passed the six scores. Use pass by reference to receive the lowest test score.• int findLowest should find and return the lowest of the six scores passed to it. It must be called by the calcAverage function, which uses it to determine which of the six scores to drop.• void displayResults should be called by the main function…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…
- Write C++ program from the pseodocode . Design a program that computes pay for employees. Allow a user to continuously input employees' names until an appropriate sentinel value is entered. Also input each employee's hourly wage and hours worked. Compute each employee's gross pay (hours times rate), withholding tax percentage withholding tax amount, and net pay (gross pay minus withholding tax). Display all the results for each employee. After the last employee has been entered, display the sum of all the hours worked, the total gross payroll, the total withholding for all employees, and the total net payroll. //Pseudocode //start// Declarations// string empName// num salary// num hrsWorked// num x// num grossPay// num withTax// num netPay// num totalGrossPay=0// num totalHrsWorked=0// num totalWithTax=0// num totalNetPay=0// string QUIT = "zzzz"// num SIZE = 4// num WITH_RATES[SIZE]= 0.10, 0.13, 0.16, 0.20// num WITH_RANGES[SIZE]= 0, 300.01, 550.01, 800.01 // getReady()// while…You are required to write a C++ program to determine the number of students based ontheir weight range. First, the user must input the total number of students in the class. Next,by using looping, the user need to input the weight, in kilogram (kg), for each of thestudents. The program should display error message if the user input invalid weight. Theprogram should produce the output according to the following format: Range(kg) Number of StudentsBelow 40 ?41 – 60 ?61 – 80 ?81 – 100 ?Above 100 ?THIS IS FOR C++ ONLY Part 2b: Password Verification A secure password is critically important in today's world. Organizations typically have stringent requirements to ensure a password is complex enough so as not to be easily hacked. Write a program that will accept as input a potential password and determine whether or not it is valid in meeting the following criteria: at least eight characters long at least one uppercase letter at least one lowercase letter at least one digit at least one special character (you can determine what is acceptable) If the password is valid, ask the user to enter it again. If it matches, indicate the password has been accepted. If the password does not meet any of the above criteria, indicate which it does not meet.
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)