Using the knowledge in computational language in C++ it is possible to write a code that define a function scalegrade() that takes one integer parameter as the student's score and one character parameter passed by pointer as the student's grade.
Writting the code:#include<iostream>
using namespace std;
bool ScaleGrade (int points, char &grade) //function definition
{
if (points >= 67 && points < 80) //points validation
{
if (grade == 'C') //when grade equals to 'C'
return false; //then returns false
grade = 'C'; //assigns 'C' to grade
return true; //returns true
}
return false;
}
int
main ()
{ //declarations
int studentTotal;
char studentGrade;
bool isChanged;
cin >> studentTotal;
cin >> studentGrade;
isChanged = ScaleGrade (studentTotal, studentGrade); //funcion calling
if (isChanged)
{
cout << "Grade is " << studentGrade << " after curving." << endl;
}
else
{
cout << "Grade " << studentGrade << " is not changed." << endl;
}
return 0;
}
See more about C++ at brainly.com/question/19705654
#SPJ1
to track and collect alerts generated by a network monitoring system and pass them to a central server, where they can be automatically picked up, evaluated, and, when appropriate, logged as an incident, a system would be best.
All occurrences are recorded, all recordings are kept forever, and there is endless time and money to go over all the recorded data in digital investigative heaven.
Commercially available log gathering, analysis, and reporting systems are available. In addition to options for storing logs, log management systems include a configuration interface that enables administrators to set log retention parameters for each specific data source. The essential nonrepudiation capabilities, such as "signing" logs with a calculated hash that can be afterwards compared to the files as a checksum, are also provided by log management systems at the time of collection. After being gathered, the logs can also be searched, analyzed, and produced prefiltered reports that display log data pertinent to a certain function or purpose.
Learn more about Management here-
https://brainly.com/question/14523862
#SPJ4
raul uses social media to post links that, when clicked, secretly install software on others’ computers without the owners’ knowledge raul’s software is designed to harm or disrupt the computers. this program is
Since this program secretly install software on others' computers without the owners' knowledge and Raul's software is designed to harm or disrupt the computers, this program is a: A) malware.
What is a malware?A malware simply refers to any type of software program or file that is designed and developed to be intentionally harmful to the host computer, website, server, or network, especially for the purpose of wreaking havoc, disruption, and destruction such as a Rootkit.
What is a Rootkit?In Computer technology, a Rootkit is a type of malware (Trojan) which refers to a software program or set of tools that is designed and developed to gain access and control of an end user's computer system without revealing its presence, while extracting sensitive information.
In conclusion, we can reasonably infer and logically deduce that Raul's software is a malware because it is designed and developed to harm or disrupt the computers.
Read more on malware here: brainly.com/question/17209742
#SPJ1
Complete Question:
Raul uses social media to post links that, when clicked, secretly install software on others' computers without the owners' knowledge Raul's software is designed to harm or disrupt the computers. This program is
A)malware.
B)a phish.
C)entrapment.
D)larceny.
implement a method that combines the stability of the bisection method with the fast convergence of newton’s method. this will require a combined approach, using newton’s method when possible and taking iterations with the bisection method whenever newton’s method does not converge. make the implementation of each method as clear as possible using separate functions that are easy to grade. display the following as output to the console:
Using the knowledge of computational language in python it is possible to describe a method that combines the stability of the bisection method with the fast convergence of newton’s method.
Writting the code:def findzero(a, b, tol, maxit, f, df):
# Input:
# a, b = The endpoints of the interval
# tol = The required tolerance
# maxit = Maximum number of iterations
# f, df = The function and its dericative
# Output:
# star = approximation of root
# niter = number of iterations for convergence
# ierr =
# 0, the method converged
# 1, df was singular
# 2, maximum number of iterations has been reached
# Approximating the root
xi_1 = x0 = approximation_of_x0(a, b, f, 100)
# xi_1 is xi-1
for i in range(1, maxit + 1):
# Check if df is singular i.e df(xi_1) is equal to 0
if df(xi_1) == 0:
xstar = xi_1
ierr = 1
niter = i
break
# Calculate next x using Newton Method xi-1 i.e xi_1
xi = Newton_method(xi_1, f, df)
# Check if xi is in [a, b]
if xi >= a and xi <= b:
xi = (a + b)/2
# Check for Convergence
if abs(xi - xi_1) <= tol:
niter = i
xstar = xi
if i == maxit:
ierr = 2
else :
ierr = 0
break
# Check the third condition
if f(a)*f(xi) <= 0:
b = xi
else :
a = xi
# Check if maxiterations are completed
if i == maxit:
xstar = xi
ierr = 2
niter = i
# break
xi_1 = xi
return xstar, niter, ierr
def Newton_method(xi_1, f, df):
xi = xi_1 - (f(xi_1)/ df(xi_1))
return xi
def approximation_of_x0(a, b, f, iterations):
# Using bisection method to approximate the intial root
# if you want to approximate with more accuracy just increase the number of iterations
for i in range(iterations):
xi = (a + b)/2
if f(a)*f(xi) <= 0:
b = xi
else :
a = xi
x0 = (a + b)/2
return x0
# To check the code. i have tested on the sample function
# f = x^2 - 4 i.e 2 is the root of f
# df = 2*x
def f(x):
return (x**2) - 4
def df(x):
return 2*x
a, b = [0, 100]
tolerance = 10**-3
maxit = 19
xstar, niter, ierr = findzero(a, b, tolerance, maxit, f, df)
print("xstar : ", xstar)
print("niter : ", niter)
print("ierr : ", ierr)
if ierr == 0:
print("the method converged")
elif ierr == 1:
print("df was singular")
else:
print("max iterations are reached")
See more about python at brainly.com/question/19705654
#SPJ1
a. host a is sending host b a large file over a tcp connection. assume host b has no data to send host a. host b will not send acknowledgments to host a because host b cannot piggyback the acknowledgments on data. b. the size of the tcp rwnd never changes throughout the duration of the connection. networks, homework 3. instructor: rajendra v. boppana 220918 2 c. suppose host a sends host b a large file over a tcp connection. the number of unacknowledged bytes that a sends cannot exceed the receive buffer size. d. suppose host a sends a large file to host b over a tcp connection. if the sequence number for a segment of this connection is m, then the sequence number for the subsequent segment will necessarily be mm 1. e. the tcp segment has a field in its header for rwnd. f. suppose that the last samplertt in a tcp connection is 1 sec. the current value of timeoutinterval for the connection will be ≥ 1 sec. g. suppose host a sends one segment with sequence number 38 and 4 bytes of payload over a tcp connection to host b. in this same segment, the acknowledgment number is necessarily 42.
A)False Host b can send acknowledgment.
B)False rwnd can change during TCP connection.
C)True rwnd is less than rcvr buffer.
D)False It is not required.
E) True size of file is 16 bite.
G)False acknowledgment number will not be 42.
The Transmission Control Protocol (TCP), a communications standard that enables computer hardware and software to exchange messages over a network, is referred to by the abbreviation "TCP." It is made to transmit packets across the internet and guarantee the successful transmission of data and messages through networks. Numerous internet applications, including as the World Wide Web (WWW), email, File Transfer Protocol, Secure Shell, peer-to-peer file sharing, and streaming video, heavily rely on TCP. To provide dependable packet transfer over IP, a transport protocol called TCP is used. Many of the issues associated with packet-based messaging, including lost, out-of-order, duplicate, and corrupted packets, are addressed by the mechanisms built into TCP.
Learn more about TCP here:
https://brainly.com/question/23854731
#SPJ4
the most powerful computers, , can evaluate complex data very quickly. many of these computers in the united states are owned by the government or major research institutions and can cost $1 million dollars or more.
The most powerful computers, supercomputers, can evaluate complex data very quickly. Many of these computers in the United States are owned by the government or major research institutions and can cost $1 million dollars or more.
What is a computer?A computer can be defined as an electronic device that is designed and developed to receive data in its raw form as an input and processes these data through the central processing unit (CPU) into an output (information) that could be seen and used by an end user.
What is a supercomputer?A supercomputer simply refers to one of the most powerful computers that is designed and developed for handling, evaluating, and solving very complicated problems or tasks. Additionally, supercomputers have the ability to carry out trillions of calculations per second.
Read more on supercomputer here: https://brainly.com/question/14883920
#SPJ1
Complete Question:
The most powerful computers, _____, can evaluate complex data very quickly. Many of these computers in the United States are owned by the government or major research institutions and can cost $1 million dollars or more.
the only difference between the get function and the >> operator is that get reads the first character typed, even if it is a space, tab, or the [enter] key.
True, the only difference between the get function and the >> operator is that get reads the first character typed, even if it is a space, tab, or the [enter] key.
What are functions and operators?
In programming terms, an operators used to manipulate individual data items and return a result while functions are blocks of organized, reusable code that is used to perform a single, related action.
They are different operators and they include:
Arithmetic Operators Assignment Operators Comparison Operators Concatenation Operators Logical Operators Boolean OperatorsLearn more about Operators from:
https://brainly.com/question/26680966?referrer=searchResults
SPJ4
write an excel formula in cell models!h3 to determine the base price for the classic european home. this formula should also work when you copy it down to determine the base price for the new american home, cse favorite, etc. recall that the base price for each model depends on the number of levels and total square footage of the home. ($/sf for all combinations of stories) square footage can be found in the base worksheet.
The selling price can be the base pricing plus the fundraising fee, enabling you to define fundraising fees on a product level. The base price can be the amount you charge the team.
The sticker price is the amount that the dealership lists as the asking price when a car is put up for sale. This price includes extra fees for things like transportation (sometimes known as a destination fee), setup expenses, and dealer- or aftermarket-installed items. The base price is a product's first asking price. It includes both the cost price and the markup required for the product's selling. The base price per square foot (BSP) of the property is the price at which the seller has placed it for sale.
Learn more about Base price here-
https://brainly.com/question/13822514
#SPJ4
modify short names by deleting the first element and changing the last element to joe. sample output with input: 'gertrude sam ann joseph' ['sam', 'ann', 'joe']
The above problem is a simple programming prompt resolved using Phyton. See the relevant code below.
What is Phyton?Guido van Rossum created Python, an interpreted, object-oriented, high-level programming language with dynamic semantics. It was first published in 1991.
Its design concept prioritizes code readability by employing heavy indentation. Python is garbage-collected and dynamically typed. It is compatible with a variety of programming paradigms, including structured, object-oriented, and functional programming.
Hence the above result is achieved using the following code:
user_input = input()
short_names = user_input.split()
short_names.pop(0)
short_names[-1] = 'Joe'
print(short_names)
The above code can be run on a Phyton compiler online or offline.
Learn more about Phyton:
https://brainly.com/question/26497128
#SPJ1
Full Question:
Modify short_names by deleting the first element and changing the last element to Joe. Sample output with input: 'Gertrude Sam Ann Joseph'. Solve this problem with python
write a program that takes three integers as input: low, high, and x. the program then outputs the number of multiples of x between low and high inclusive. ex: if the input is: 1 10 2 the output is: 5 python
#Code in python
print("ENTER LOW, HIGH AND X")
low=int(input())
high=int(input())
x=int(input()) c=0
for i in range(low,high):
if i%x==0:
c++
print(c)
Python is an object-oriented, dynamically-semantic, interpreted high-level programming language. Its high-level built-in data structures, along with dynamic typing and dynamic binding, making it particularly appealing for use in rapid application development as well as as a scripting or glue language to join together preexisting components. Python's syntax is also straightforward and quick to learn. Python allows packages and modules, which promotes the modularity and reuse of code in programs. For all popular systems, the Python interpreter and the comprehensive standard library are free to download in source or binary form and can be shared without restriction. Because Python increases efficiency, programmers frequently fall in love with it. The cycle of edit-test-debug is extremely quick because there is no compilation stage. Python scripts are simple to debug because a defect or incorrect input will never result in a segmentation fault. Instead, an exception is raised when the interpreter finds a mistake.
Learn more about python here:
https://brainly.com/question/13437928
#SPJ4
problem 7 network address address class default subnet mask custom subnet mask total number of subnets total number of host addresses number of usable addresses number of bits borrowed 10.0.0.0 /16 what is the 11th subnet range? what is the subnet number for the 6th subnet? what is the subnet broadcast address for the 2nd subnet? what are the assignable addresses for the 9th subnet?
The 11th subnet range is = 10.10.0.0 to 10.10.255.255
The broadcast address of the 2nd subnet will be = 10.1.255.255
The assignable address range for the 9th subnet will be = 10.8.0.1 to 10.8.255.254
5 is the subnet number for the 6th subnet
Each device has an IP address made up of two parts: the client, also known as the host address, and the server, also known as the network address. A DHCP server or a user must manually configure IP addresses (static IP addresses). The subnet mask divides the IP address into host and network addresses, designating which portion of the address belongs to the device and which to the network. A gateway, also known as the default gateway, joins local devices to other networks. As a result, whenever a local device wants to send data to a device with an IP address on a different network, the gateway receives the packets first and then passes them on to the intended recipient outside of the local network.
Learn mor about Subnet here:
https://brainly.com/question/15055849
#SPJ4
e usually use a statistic to help determine which model the evidence points towards. what is a statistic that we can use to compare outcomes under emily’s model to what was observed? assign valid stat to an array of integer(s) representing test statistics that emily can use:
Social media have significantly increased in popularity in recent years and give people the chance to network, interact, and share globally.
Social networking sites are becoming an increasingly significant part of students' daily life, thus it's crucial to comprehend how technology affects the learning process. Even though university students use social media frequently, little research has examined in-depth how much they are embracing particular social media for learning. This study used a mixed-methods approach with three stages to look into how students utilize social media, and particularly social network sites, to promote learning. In the first step, data from an online survey of 812 university students regarding their use of social media was statistically analyzed.
Learn more about Network here-
https://brainly.com/question/15088389
#SPJ4
when configuring the virtual network for a vm in vmware workstation, which network adapter option should you choose if you want the vm to have an ip address that works on the physical network?
When setting up a virtual network for a virtual machine in VMware Workstation, you should choose the Bridged network adapter option if you want the virtual machine's IP address to work on the actual network.
When it's not possible to connect devices directly to a router or switch, a bridge enables you to connect two or more network segments together, allowing devices to join the network. If your business or home is a mixed-network setting, network bridging can be helpful. A mixed network is one that consists of some computers connected via Ethernet cables and others using wireless routers. A series of desktop hypervisor solutions called VMware Workstation enables users to run virtual machines, containers, and Kubernetes clusters.
learn more about Bridge network here
https://brainly.com/question/10920464
#SPJ4
Match the items with their respective descriptions.
to navigate between worksheets
to protect a worksheet
to change the position of a worksheet
to rename a worksheet
select a password
arrowRight
drag the worksheet tab to the new position
arrowRight
double-click the worksheet tab
arrowRight
press Ctrl and Page Up or Page Down keys
arrowRight
Answer: Here are the correct matches:
Select a Password ----> to protect a worksheet
drag the worksheet tab to the new position ----> to change the position of a worksheet
double-click the worksheet tab ----> to rename a worksheet
Press Ctrl and Page Up or Page Down keys ----> to navigate between worksheets
Explanation: Confirmed correct. :)
Common methods of securing an IT system do NOT include
A) protecting system integrity by using antimalware programs
B) protecting data integrity by unblocking unauthorized access
C) protecting data integrity by creating backups, entering and editing data correctly
D) setting permissions to restrict access
Common methods of securing an IT system do not include B) protecting data integrity by unblocking unauthorized access.
What purposes do IT systems serve?An information technology system (IT system) is typically an information system, a communications system, or, more specifically, a computer system, that has about all peripheral devices, software, as well as hardware, that is used by a little number of IT users.
They include:
Make a backup of your data.Use secure passwords.When working remotely, use caution.Install malware and antivirus protection.Note that it does not include option B because that cannot guarantee system security.
Learn more about IT system from
https://brainly.com/question/25720881
#SPJ1
100 POINTS. BAD ANSWERS WILL BE REPORTED. GOOD ANSWERS MARKED FOR BRAINLIEST. WON'T HESITATE TO REPOST.
Which of the following programs are command-line programs?
All programs written in IDLE
Programs that are called via CLI
Programs that are called via graphics
Programs that need GUI to execute
Answer: The correct answer is Programs that are called via CLI
Explanation: Command Line Interface applications (CLI) are typically used to call other CLI programs, batch files or command prompt executables. Command-line interfaces are also referred to as command-line user interfaces, console user interfaces, and character user interfaces, though their intended use varies. CLI input can be entered as input commands by the keyboard and then run by the computer.
Answer:
Programs that are called via CLI.
the other options are non-examples because they are a different category of programs (GUI, graphics, and IDLE).
What is the possible output of the following?
r = random.random() + 1
print(r)
Group of answer choices
1.0 <= r < 2.0
1.0 <= r <= 2.0
1.0 < r <= 2.0
1.0 < r < 2.0
Considering the definition of the python function random, a possible output for the following code is:
1.0 <= r <= 2.0.
What is the possible output for the given code?The calculation of the value of r is given as follows:
r = random.random() + 1
The command random.random() returns a random value between 0 and 1, inclusive.
Then, the number one is added to the value stored at variable r.
The minimum value that can be stored at r is of 1, when the function random.random() returns it's minimum value of 0, then r = 0 + 1 = 1.The maximum value that can be stored at r is of 2, when the function random.random() returns it's maximum value of 1, then r = 1 + 1 = 2.Then the interval that represents the possible outputs for the function is:
1.0 <= r <= 2.0.
More can be learned about python functions at https://brainly.com/question/15185464
#SPJ1
question 3. (30 pts) (6 points each) consider the following relations. the key fields are bold and underlined. employee (ssn, name) project1 (id, name, mgr ssn) work on (ssn, id, year)
Designed for managing data stored in a relational database management system, SQL is a database language. IBM created SQL for the first time in the early 1970s (Date 1986).
The original SEQUEL (Structured English Query Language) version was created to access and handle data held in IBM's System R quasi-relational database management system. The first SQL implementation to be made commercially available was Oracle V2, which was released for VAX systems in the late 1970s by Relational Software Inc., later to become Oracle Corporation. In this chapter, we'll concentrate on utilizing SQL as a data defining language to build databases and table architectures (DDL).
Learn more about database here-
https://brainly.com/question/6447559
#SPJ4
The designers of a database typically begin by developing a __________ to construct a logical representation of the database before it is implemented.
The designers of a database typically begin by developing a Data model to construct a logical representation of the database before it is implemented.
What is a data model?
A data model in database is a type of data model that determines the logical structure of a database. It fundamentally determines in which manner data can be stored, organized and manipulated. They are three primary data models namely: relational, dimensional, and entity-relationship (E-R).
Learn more on Database model from:
https://brainly.com/question/17081023?referrer=searchResults
#SPJ4
(I already wrote the definitions.) Define: arch, vault and dome. Make a schematic diagram of each of them.
Please help me with the diagram
An arch, as used in architecture, is any method other than a lintel used to cross an aperture. Curves define true arches. A vault is an arched ceiling or roof made of stone, brick, or concrete; wood or plaster may also be used as an imitation. A dome is a circular base-mounted vault with an equal curvature.
Who developed the arch vault and dome?The Etruscans taught the arch to the ancient Romans, who improved it and were the first architects and builders in Europe to use it to its full potential for structures above ground. The benefits of the arch, the vault, and the dome were fully appreciated by Roman builders before anyone else in Europe or possibly the entire world.
Note that a vault is a brick, stone, or concrete ceiling that is said to be constructed using the arch design principle. A tunnel vault, also known as a barrel vault, is a semicircular extension of an arch that resembles a tunnel and can be imagined as an uninterrupted line of arches packed close together, one behind the other.
Learn more about vault and dome from
https://brainly.com/question/8555535
#SPJ1
the talk-a-lot cell phone company provides phone services for its customers. create an abstract class named phonecall that includes a string field for a phone number and a double field for the price of the call. also include a constructor that requires a phone number parameter and that sets the price to 0.0. include a set method for the price. also include three abstract get methods—one that returns the phone number, another that returns the price of the call, and a third that displays information about the call.
abstract class PhoneCall
{
String phoneNumber;
double price;
PhoneCall(String phoneNumber)
{
this.phoneNumber = phoneNumber;
this.price = 0.0;
}
public String getPhoneNumber() {
return phoneNumber;
}
public double getPrice() {
return price;
}
public abstract void setPrice();
}
public class DemoPhoneCalls {
public static void main(String [] args) {
incomingPhoneCall.info();
outgoingPhoneCall.info();
}
}
An abstract class is a class that has been explicitly designated as such; it may or may not contain abstract methods. Although abstract classes cannot be created, they can be subclassed. Whenever an abstract class is subclassed, the parent class's abstract methods are typically implemented by the subclass. If you want to give all component implementations a common, implemented feature, you use an abstract class. When compared to interfaces, abstract classes allow you to partially implement your class while interfaces would have no implementation at all for any of the members. An abstraction that makes it simple to add more vehicles is, for instance, a Vehicle parent class from which Truck and Motorbike inherit.
Learn more about abstract class here:
https://brainly.com/question/13072603
#SPJ4
Please help me ASAP!!!
Answer:
The answer to 6 = Systems,
The answer to 9 = Web.
various cipher machines were developed and used during the two world wars. for example, enigma, schlusselzusatz, purple, etc. it was believed that keeping secret the design of the machines will help boost the security.
The Enigma machines that Germany utilized in World War II but that the Allies cracked are the most infamous example of cryptography.
A tangible object that carries out a cryptographic function (e.g., random number generation, message authentication, digital signature generation, encryption, or key establishment). For cryptographic operations, a cryptographic device must use one or more cryptographic modules. The number of remaining Enigma machines is unknown, however it is believed that there are a few more "hiding." It is known that there are roughly 300 Enigma devices in museums and private collections around the world.
By doing this, a rotor machine generates an intricate polyalphabetic substitution cipher that alters with each keystroke.
Learn more about cryptographic here-
https://brainly.com/question/14278859
#SPJ4
tomio has been working as an assistant database analyst for three months. during a recent conversation with his supervisor, tomio explained his goal "to improve his computing skills by the end of the year." is this a smart goal?
Is this a SMART goal: B) No, SMART goals must be specific and measurable.
What is a SMART goal?A SMART goal can be defined as a well-established tool that can be used by an individual, a project manager or business organization (company) to plan (create), track, and achieve (accomplish) both short-term and long-term goals.
Generally speaking, SMART is a mnemonic acronym and it comprises the following elements:
SpecificMeasurableAchievable or Attainable.Relevancy (realistic).Time bound (timely)In conclusion, we can reasonably infer and logically deduce that Tomio's goal is not a SMART goal because it is neither specific nor measurable.
Read more on SMART goal here: brainly.com/question/18118821
#SPJ1
Complete Question:
Tomio has been working as an assistant database analyst for three months. During a recent conversation with his supervisor, Tomio explained his goal "to improve his computing skills by the end of the year." Is this a SMART goal?
A) Yes, SMART goals should set a timeline for being achieved.
B) No, SMART goals must be specific and measurable.
C) No, SMART goals must have a target date.
D) Yes, SMART goals should be results-oriented.
you have an azure virtual machine named computer5 and a recovery services vault named vault5. computer5 contains the following data disks: diska has a size of 512 gb diskb has a size of 30 tb diskc has a size of 26 tb diskd has a size of 2.0 tb which data disks can you back up to vault5?
The data disks that you can back up to Vault5 are: DiskA, DiskB, DiskC, and DiskD.
What is a hard disk drive?A hard disk drive can be defined as an electro-mechanical, non-volatile data storage device that is made up of magnetic disks (platters) that rotates at high speed.
What is virtualization?Virtualization simply refers to the creation of an abstract layer over computer hardware primarily through the use of a software, in order to enable the operating system (OS), storage device, server, etc., to be used by end users over the Internet such as a Virtual machine (VM).
In Computer technology, a Virtual machine (VM) that is integrated with a recovery service can be used to back up hard disk drive with a data storage space that ranges from 512 gigabyte (GB) to 30 terabyte (TB).
Read more on hard-disk here: brainly.com/question/26382243
#SPJ1
Complete Question:
You have an Azure virtual machine named Computer5 and a Recovery Services vault named Vault5. Computer5 contains the following data disks:
• DiskA has a size of 512 GB
• DiskB has a size of 30 TB
• DiskC has a size of 26 TB
• DiskD has a size of 2.0 TB
Which data disks can you back up to Vault5?
Select only one answer.
DiskA only
DiskB only
DiskC only
DiskD only
DiskA, DiskB, DiskC, and DiskD
Answer: DiskA, DiskB, DiskC, and DiskD
Explanation: 512 gigabyte (GB) up to 30 terabyte (TB) is supported.
1. The large and powerful computers which are used in air-conditioned rooms are called (a) Mainframe computers (b) microcomputers (c) Minicomputers (d) Supercomputers.
write a function drivingcost() with input parameters milespergallon, dollarspergallon, and milesdriven, that returns the dollar cost to drive those miles. all items are of type double. the function called with arguments (20.0, 3.1599, 50.0) returns 7.89975.
A function driving cost() with input parameters miles per gallon, dollars per gallon, and miles driven, that returns the dollar cost to drive those miles.
our program must define and call a function:
double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon)
#include <stdio.h>
double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon)
{
double dollarCost=drivenMiles/milesPerGallon*dollarsPerGallon;
return dollarCost;
}
int main()
{
double milesPerGallon=20.0, dollarsPerGallon=3.1599;
double cost=DrivingCost(10,milesPerGallon,dollarsPerGallon);
printf("%0.2lf ",cost);
cost=DrivingCost(50,milesPerGallon,dollarsPerGallon);
printf("%0.2lf ",cost);
cost=DrivingCost(400,milesPerGallon,dollarsPerGallon);
printf("%0.2lf\n",cost);
return 0;
}
Learn more about Gallon here-
https://brainly.com/question/9917229
#SPJ4
zach wants to install windows 10 over his existing copy of windows 10. he wants to keep his personal files, apps, and windows settings but freshen up all windows components. he currently has a usb drive with a windows 10 iso. what type of installation will you recommend for zach? a. custom installation b. fresh start installation c. repair upgrade d. network installation
Answer:
C. Repair upgrade
Explanation:
This option will allow personal files, apps, and settings to be saved while upgrading to Windows 10.
The type of installation you will recommend for Zach is a repair upgrade. The correct option is c.
What is a repair upgrade?A repair upgrade resolves Windows system problems while retaining your files, programs, and preferences. When your Windows 10 installation becomes erratic or slow, you will attempt anything to solve it, including system file checker, DISM, and check disk, to name a few.
To repair and upgrade to Windows 10, follow these steps:
Close all active applications.Insert the Windows DVD into the DVD drive of your computer.Select Install Now in the Setup window.Select Go online to get the most recent updates for installation (recommended).If prompted, enter the CD key.Therefore, the correct option is c. repair upgrade.
To learn more about repair upgrades, refer to the below link:
https://brainly.com/question/29242603
#SPJ2
given the following pseudocode, which is the argument? module main() call curvescore(82) end module module curvescore(integer score) declare integer newscore set newscore
The argument is 82 in the provided pseudocodes. Pseudocode is a made-up, informal language that aids in the creation of algorithms by programmers.
The vast majority of programmers are familiar with pseudocode. It allows the programmer to focus solely on the code development process' algorithmic component. It can't be turned into an executable program through compilation. The values that are sent between programs, functions, or subroutines are known as arguments. The argument that is supplied to the function curve in this pseudocode is Score, which is 82 in the main module. The curve Score's is then visible. As a result, the function will assign the score a value of 82. So, 82 is the correct response to this query.
Learn more about Pseudocode here-
https://brainly.com/question/13208346
#SPJ4
a laptop that you previously purchased was shipped with so-dimm memory to accommodate the laptop's form factor. you would now like to upgrade the memory.
The option to upgrade a laptop's memory is dependent on one major factor: The Purpose for which the laptop will be used.
What is the explanation for the above?Just like you'd need an SUV or tow truck to tow equipment or mobile home, and a tractor for agricultural purposes, laptops come with standard specs but with the flexibility to upgrade to accommodate the work requirements or tasks of its use.
Hence a gamer would require more RAM and processing power compared to someone whose job is writing and working with desktop publishing tools.
Hence, it is correct to state that the workload expected to be put on the laptop will determine if an upgrade to the Random Access Memory will be required.
Learn more about laptop memory:
https://brainly.com/question/28501534
#SPJ1
23.21 lab: reverse vector complete reverse() function that returns a new character vector containing all contents in the input argument reversed. ex: if the input vector is: ['a', 'b', 'c'] then the returned vector will be: ['c', 'b', 'a'] 424384.2897294.qx3zqy7
#include <bits/stdc++.h>
//Defining our vector.
std::vector<char> idx;
int main(int argc, char* argv[]) {
//We will fill our vector with input from the user.
std::cout << "How many characters: ";
int a; std::cin >> a;
for(int i=0;i<a;i++) {
char temp;
std::cin >> temp;
idx.push_back(temp);
}
//Reversing.
reverse(idx.begin(), idx.end());
//Clearing the window first
system("clear");
//Print the reversed vector.
std::cout << "Reversed: [";
for(auto const& i: idx) {
if(i==idx.at(a-1)) std::cout << i;
else std::cout << i << ", ";
}
std::cout << "]\n";
return 0;
}