Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Need this for my programming class please Submit your answers to the assessment

ID: 3878740 • Letter: N

Question

Need this for my programming class please Submit your answers to the assessment here. Here are the questions again: 1. Prompt the user to enter two integers. Compute the sum, difference, product, and ratio of the two numbers. 2. Prompt the user to enter a temperature in Fahrenheit. Display "Above Freezing" if the temp is 32 or above and display "Below Freezing" otherwise. 3. Assume you have $1000 in a savings account. Compute the balance of the account after 10 years if the account earns %5 interest a year. Use a loop for your answer. 4. Store 5 numbers in an array. Compute the average of the numbers using a loop. 5. Write a method to display the array used in Problem 4. Use the method in a program. Need this for my programming class please Submit your answers to the assessment here. Here are the questions again: 1. Prompt the user to enter two integers. Compute the sum, difference, product, and ratio of the two numbers. 2. Prompt the user to enter a temperature in Fahrenheit. Display "Above Freezing" if the temp is 32 or above and display "Below Freezing" otherwise. 3. Assume you have $1000 in a savings account. Compute the balance of the account after 10 years if the account earns %5 interest a year. Use a loop for your answer. 4. Store 5 numbers in an array. Compute the average of the numbers using a loop. 5. Write a method to display the array used in Problem 4. Use the method in a program. Need this for my programming class please Submit your answers to the assessment here. Here are the questions again: 1. Prompt the user to enter two integers. Compute the sum, difference, product, and ratio of the two numbers. 2. Prompt the user to enter a temperature in Fahrenheit. Display "Above Freezing" if the temp is 32 or above and display "Below Freezing" otherwise. 3. Assume you have $1000 in a savings account. Compute the balance of the account after 10 years if the account earns %5 interest a year. Use a loop for your answer. 4. Store 5 numbers in an array. Compute the average of the numbers using a loop. 5. Write a method to display the array used in Problem 4. Use the method in a program.

Explanation / Answer

1-

#include <stdio.h>

int main (){

    int x1, x2, sum,ratio, prod, diff;

    printf("Please Enter two numbers ");

    scanf("%d%d", &x1, &x2);

    sum = x1 + x2;

    prod = x1 * x2;

    diff = x1 - x2;

    ratio = (x1/x2); //here x1>x2

    printf("The sum of %d and %d is %d. ", x1, x2, sum);

    printf("The product of %d and %d is %d. ", x1, x2, prod);

    printf("The difference of %d and %d is %d. ", x1, x2, diff);

printf("The ratio of %d and %d is 1: %d. ", x1, x2, ratio);

return 0;

}

Note-For other questions to be answered please provide as seprate questions

Thanking You

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote