Question

Please complete the following tasks to the best of your ability. 1. Log into your account on Turing. 2. Navigate to your home
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Source Code

#include <stdio.h>

void main()

{

int arr[10];

int i;

printf("Please enter ten integers:\n");

for(i=0; i<10; i++)

Scanf("%d", &arr[i]);

printf("\nThe integers entered, in reverse, are: ");

for(i=9; i>0; i--)

printf("%d \n", arr[i]);

printf("\n");

}

Output

Please enter ten integers:
1
2
3
4
5
6
7
8
9
10

The integers entered, in reverse, are:
10
9
8
7
6
5
4
3
2
1

Discussion

Here who used 2 for loop. The first for loop scan the integers and Store it into the array. And the second for loop which is in the reverse order print the element of the array from last to first.

Please give a upvote if you feel helpful

Add a comment
Know the answer?
Add Answer to:
Please complete the following tasks to the best of your ability. 1. Log into your account...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • need help please! thanks!! C++ programming Your program should do the following Prompt the user for...

    need help please! thanks!! C++ programming Your program should do the following Prompt the user for the first number (int data type) Read the first number Prompt the user for the second number (int data type) Read the second number Write code to calculate the quotient and remainder when the first number is divided by the second number Make sure to used variables in your output statements. /* OUTPUT Enter the first number: 126 Enter the second number: 31 126...

  • this is a C++ program! You will write a program that performs the following tasks for...

    this is a C++ program! You will write a program that performs the following tasks for a simple mathematical calculator: (1) Open a user-specified file for input. Prompt for the name of the file, read it into a string variable, echo print it to the terminal and then open it. If the file is not opened, enter into a loop that prints out an error message, resets the input file stream variable (see the hints section), obtains a new file...

  • Question 3.1 Draw the class diagram for the ATM program in Question 2.1. Please find attached...

    Question 3.1 Draw the class diagram for the ATM program in Question 2.1. Please find attached the scenario in the photos. this is for programming logic and design Scenario A local bank intends to install a new automated teller machine (ATM) to allow users (i.e., bank customers) to perform basic financial transactions (see below figure). Each user can have only one account at the bank. ATM users should be able to do the following; View their account balance. Withdraw cash...

  • Answer the following questions to the best of your ability. PLEASE ANSWER ALL THIS FOR INFORMATION...

    Answer the following questions to the best of your ability. PLEASE ANSWER ALL THIS FOR INFORMATION TECHNOLOGY MANEGEMENT CLASS, THANK YOU 1) Which company has a higher degree of digitization, Amazon or E*Trade? 2) A reverse auction is common in this type of e-commerce. 3) If you use online bill pay though your bank, what type of electronic payment mechanism is your bank most likely using to transfer funds when executing a bill payment for a utility company? 4) A...

  • write a C programming code for the following prompt. please use stucture concept and test if...

    write a C programming code for the following prompt. please use stucture concept and test if the code works perfectly. Project Description: In this project, you will write a program to calculate the roots of a quadratic equation. Structure concepts will be used in this project. Your program will prompt the user to enter the coefficients of a quadra coefficientsType. Then it will compute the roots of the quadratic equation and store the result in a structure variable of type...

  • Please use public class for java. Thank you. 1. (10 points) Write a method that computes...

    Please use public class for java. Thank you. 1. (10 points) Write a method that computes future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula futurelnvestmentValue numberOfYears 12 investmentAmount X ( monthlyInterestRate) Use the following method header: public static double futurelnvestmentValue( double investmentAmount, double monthlyInterestRate, int years) For example, futureInvestmentValue 10000, 0.05/12, 5) returns 12833.59. Write a test program that prompts the user to enter the investment...

  • Problem 5 (10 points) Write a C program, called sort3.c, that performs the following task. The...

    Problem 5 (10 points) Write a C program, called sort3.c, that performs the following task. The program first prompts the user to enter three integers a, b, and c. It then sorts these integers in ascending order, so that swapping their values if necessary. Finally, the program prints the three integers entered by the user in ascending order. Here are a few sample runs of the program /home/userXYZ/ECE15/Final> sort3 Please enter three integers: 3 2 1 Here are the integers...

  • Please complete the following: Write a Python script to do the following: 1. Ask the use...

    Please complete the following: Write a Python script to do the following: 1. Ask the use to enter several sentences, one at a time in a loop). To end the sentence entry, the user enters a blank (empty) sentence. 2. Extract each word from each sentence and put it in a list. This will require at least one loop to go through each sentence in the list. It is up to you how you want to get the words in...

  • Please help me the JAVA program - Choose Your Operation Write a program that uses a...

    Please help me the JAVA program - Choose Your Operation Write a program that uses a WidgetView object to do the following: Generate two random integers between 1 and 9 (inclusive). Name one of them x, the other y. Display them to the user using JLabel objects. Create a JLabel object displaying the text "Enter an operation number." Create a JTextField for the user's input. Create a JButton displaying the text "Press here when you've entered your operation." Use addAndWait...

  • PLEASE USE ECLIPSE AND INCLUDE A READABLE COPY OF YOUR OUTPUT FOR THE FOLLOWING PROBLEM. IT...

    PLEASE USE ECLIPSE AND INCLUDE A READABLE COPY OF YOUR OUTPUT FOR THE FOLLOWING PROBLEM. IT IS VERY IMPORTANT TO USE ECLIPSE AND NOT SOMETHING ELSE TO WRITE THE REQUIRED C++ PROGRAM. THANK YOU. Design Specifications: Write a C++ function named inches_ to centimeters (). This function accepts one variable of type float that represents the value of inches, and returns one variable of type float that represents the equivalent number of centimeters. Use the relationship that 1 inch 2.54...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT