void minMax(int a, int b, int c, int*big, int*small)
{
if(a>b && a >c){
*big = a;
if(b>c)
*small = c;
else
*small = b;
}
else if (b>a && b>c){
*big = b;
if(a>c)
*small = c;
else
*small = a;
}
else{
*big = c;
if(a>b)
*small = b;
else
*small = a;
}
}
Answer:
void delete_record(student_record *arr, int &size, int age, string name, double gpa) {
int index = -1;
if (arr != NULL && size > 0) {
for (int i = 0; i < size; ++i) {
if (arr[i].age == age && arr[i].name == name && arr[i].gpa == gpa) {
index = i;
break;
}
}
}
if (index != -1) {
for (int i = index; i < size - 1; ++i) {
arr[i] = arr[i + 1];
}
size--;
}
}
Yum sounds like a good idea
Answer:
In 2000, a basic internet application cost businesses approximately $150,000 per month. In mid-2016, operating the same application in Amazon's cloud cost approximately $1,000 per month.
Explanation:
The role of cloud services cannot be overemphasized. Providing Infrastructure as a service (IaaS), Platform as a service (PaaS) and Software as a service (SaaS) cost a lot as there were very few cloud service providers and most services were yet to be integrated to the cloud.
But as at 2016, the cost on applications dropped as we have experienced an exponential growth in cloud services and applications, we now have Internet of Things (IoT) and other cloud infrastructure.
Answer:
Here is the program:
current_time = '2014-07-26 02:12:18:'
my_city = ''
my_state = ''
log_entry = ''
my_city = input("") #reads in value for my_city
my_state = input("") #reads in value for my_state
log_entry = current_time + ' ' + my_city + ' ' + my_state #concatenates current_time, my_city and my_state values with ' ' empty space between them
print(log_entry)
Explanation:
You can also replace
log_entry = current_time + ' ' + my_city + ' ' + my_state
with
log_entry = f'{current_time} {my_city} {my_state}'
it uses f-strings to format the strings
If you want to hard code the values for my_city and my_state then you can replace the above
my_city = input("")
my_state = input("")
with
my_city = "Houston"
my_state = "Texas"
but if you want to read these values at the console from user then use the input() method.
The screenshot of the program along with the output is attached.