1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nignag [31]
3 years ago
7

Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards

, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print:Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards, then backwards. End each loop with a newline. Ex: If courseGrades = {7, 9, 11, 10}, print:
Computers and Technology
1 answer:
siniylev [52]3 years ago
3 0

C program for printing elements in a format

#include <stdio.h>

int main() //driver function

{

int courseGrades[100];

int n,i;

printf("How much grades points were there");

scanf("%d",&n);

printf("Enter grade elements\n"); //Taking input from user

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

{

scanf("%d",&courseGrades[i]);

}

printf("Elements are \n"); //printing the elements that user entered

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

{

printf("%d",courseGrades[i]);

}

printf("\nPrinting elements in the format\n");

for(i=0;i<n;i++) /*loop for the first line,\t is used for horizontal spacing*/

{

printf(" %d\t",courseGrades[i]);  

}

printf("\n"); /*\n is used to get the new line*/

for(i=n-1;i>=0;i--) /*loop for printing the input in reverse order*/

{

printf("%d \t",courseGrades[i]);  

}

return 0;

}

<u>Output</u>

How much grades points were there  4 Enter grade elements {7,9,11,10}

Elements are

791110

Printing elements in the format

7  9  11  10

10  11  9  7  

You might be interested in
Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?
garik1379 [7]

Answer:

D. 41

Explanation:

101001 is in base 2.

To convert 101001 to base 10;

1*2^5+0*2^4+1*2^3+0*2^2+0*2^1+1*2^0

1*32+0*16+1*8+0*4+0*2+1*1

32+0+8+0+0+1

=41

8 0
3 years ago
Who is the fan of Techno gamerz and Total gaming
Helen [10]
Over here lol- it’s pretty cool
6 0
3 years ago
Incident damage ____ is the rapid determination of the scope of the breach of the confidentiality, integrity, and availability o
Dominik [7]

Answer:

The answer is "assessment"

Explanation:

In the given question some information is missing, that is options that can be described as follows:

a) containment strategy.

b) assessment.

c) incident response.

d) disaster assessment.

Assessment also known as community risk, which is used for evaluations. It played a crucial role in the reaction and recovery after a dangerous incident in any organization.

  • In this process, the Information of the degree and the position, which is lost are included in the collected information by the Accident investigation Taskforce.
  • This data is analyzed to evaluate the needs of members and the entire community, and other choices are wrong that can be described as follows:
  • In option a, It is a part of world war II, that's why it is wrong.
  • In option c, It is a method that is sort major incident, that's why it is wrong.
  • In option d, It uses cost control and risk avoidance, that's why it is wrong.

8 0
3 years ago
)
I am Lyosha [343]

Photo metadata

Hope this helps

5 0
3 years ago
Do you think the current system of punishment in the United States works? Why? What would you change?
Simora [160]

Well the fact that jails are overcrowded is one factor that shows it's not working. Some people need help from past traumas, abuse, etc. Not everyone that acts out needs to be incarcerated, they need rehabilitation or counseling. Definitely depends on the crime committed. Therefore substance abuse users would be in rehabilitation. Even Juveniles in detention centers don't benefit from incarceration for certain offenses. There is no rehabilitation in incarceration. There are more criminals in jail and incarceration in my opinion, only for some offenders, is the last option. Now for Sex Offenders, Murderers and Criminals with violent crimes my opinion is completely opposite. Some of those offenders should be dealt with according to their crime. Also, all of the people that have been pardoned and them lessening time for drug traffickers and actual drug dealers (not necessarily users) is just a bad thing to pardon them or let them out because they don't have any violent crimes. Isn't dealing drugs, that are killing people every single day just as bad as a violent crime. In my opinion they can sit and rot for the longevity of their sentence. Some need help and I would fully support that only under some circumstances. Others I would rather not have to live amongst them.

8 0
3 years ago
Other questions:
  • a reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. which action ca
    8·1 answer
  • Sharing a workbook helps to complete ________ (A, tasks) (B,changes) (C, typing) on time. Multiple people acssessing the workboo
    9·1 answer
  • What is an example of how pseudo - randomness is used to creative variation​
    5·1 answer
  • _ models are non visual ways of communicating how someone thinks about something in the natural world
    12·1 answer
  • In the Mouse Properties window, you can?
    8·1 answer
  • Write a qbasic program to display integer numbers 1 to 100 using the for next loop<br>​
    9·1 answer
  • E Highlight
    6·1 answer
  • Where is information stored in the computer?​
    9·1 answer
  • What is Microsoft marketing ?
    10·1 answer
  • Give me 4 examples of things to consider as a sound designer?<br> HURYYYYY IM TIMED
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!