jasminecarter470

jasminecarter470

Lv2

Jasmine Carter

1 Follower
0 Following
1 Helped

ANSWERS

Published15

Subjects

Law1Science1Information Technology2Computer Science1Calculus6Economics1Chemistry3
Answer:the man would weigh 632.28 pounds on Jupiter, which is much heavier tha...
Answer: the future value of $500 invested at a 10% compound interest rate for ...

Hi. This code hass errors when I add first cite. Thx

#include <stdio.h>

#include <string.h>

 

#define NUM_CITIES 5

 

struct City {

char name[20];

float precipitation;

};

 

void rank_cities(struct City cities[], int num_cities) {

struct City temp;

for (int i = 0; i < num_cities - 1; i++) {

for (int j = i + 1; j < num_cities; j++) {

if (cities[i].precipitation > cities[j].precipitation) {

temp = cities[i];

cities[i] = cities[j];

cities[j] = temp;

}

}

}

}

 

int main() {

struct City cities[NUM_CITIES];

float total_precipitation[NUM_CITIES] = {0};

float min_precipitation = 1000000, max_precipitation = -1;

int min_index, max_index;

 

for (int i = 0; i < NUM_CITIES; i++) {

printf("Enter the name of city #%d: ", i + 1);

scanf("%s", cities[i].name);

printf("Enter the amount of precipitation in mm for %s: ", cities[i].name);

scanf("%f", &cities[i].precipitation);

total_precipitation[i] = cities[i].precipitation;

 

if (cities[i].precipitation < min_precipitation) {

min_precipitation = cities[i].precipitation;

min_index = i;

}

if (cities[i].precipitation > max_precipitation) {

max_precipitation = cities[i].precipitation;

max_index = i;

}

}

 

float total = 0, average;

for (int i = 0; i < NUM_CITIES; i++) {

total += total_precipitation[i];

}

average = total / NUM_CITIES;

 

rank_cities(cities, NUM_CITIES);

 

printf("\nCity Rankings:\n");

for (int i = 0; i < NUM_CITIES; i++) {

printf("%d. %s (%.1f mm)\n", i + 1, cities[i].name, cities[i].precipitation);

}

 

printf("\nCity with minimum precipitation:\n%s (%.1f mm)\n", cities[min_index].name, min_precipitation);

 

printf("\nCity with maximum precipitation:\n%s (%.1f mm)\n", cities[max_index].name, max_precipitation);

 

printf("\nAverage precipitation across all cities: %.1f mm\n", average);

 

return 0;

}

Answer:#include <stdio.h>#include <string.h>#define NUM_CITIES 5st...
Answer:the angle of ascent of the branch trail is approximately 11.1 degrees. ...

Answer:the amount of work done lifting all the salt water over the top of the ...
Answer:By implementing the PreferredSizeWidget interface and providing a prefe...
Answer: "Kantian Insights: Reflecting on Immanuel Kant's Categorical Imperativ...
Answer:the man fell approximately 2722.9 feet. Step-by-step explanation: Assum...

Hi. You had just helped me with this code. But Im getting wornings that crash code.

 

#else

#if _CONTROL_FLOW_GUARD_SHADOW_STACK_SUPPORTED
    __declspec(guard(nosspro)) __declspec(guard(nossepi))
#endif
    __declspec(noreturn) void __cdecl __report_gsfailure(GSFAILURE_PARAMETER)
    {
        if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))
        {
            __fastfail(FAST_FAIL_STACK_COOKIE_CHECK_FAILURE);
        }

        volatile UINT_PTR cookie[2];

        // Set up a fake exception, and report it via UnhandledExceptionFilter.
        // We can't raise a true exception because the stack (and therefore
        // exception handling) can't be trusted after a buffer overrun.  The
        // exception should appear as if it originated after the call to
        // __security_check_cookie, so it is attributed to the function where the
        // buffer overrun was detected.

        #if defined _M_IX86
        // On x86, we reserve some extra stack which won't be used.  That is to
        // preserve as much of the call frame as possible when the function with
        // the buffer overrun entered __security_check_cookie with a JMP instead of
        // a CALL, after the calling frame has been released in the epilogue of
        // that function.
        ULONG volatile dw[(sizeof(CONTEXT) + sizeof(EXCEPTION_RECORD)) / sizeof(ULONG)];

        // Save the state in the context record immediately.  Hopefully, since
        // opts are disabled, this will happen without modifying ECX, which has
        // the local cookie which failed the check.
        __asm

Answer:this code appears to be part of a security mechanism designed to protec...
Answer: the particular solution to the differential equation is: y_p = ex - 2x...
Answer: y(x) = c1e^x + c2e^(-0.5x) + c3e^(0.5x) where c1, c2, and c3 are const...
Answer:The amount of heat released when 75 g of octane is burned completely is...
Answer: To solve this problem, we need to use the given standard enthalpy chan...
Answer: The molecule is 2-pentene. The correct spelling and formatting is: CH3...
Answer: 1. atmospheric convection cells 2. a hurricane 3. In the basement Step...

Weekly leaderboard

Start filling in the gaps now
Log in