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
When a machine on the public network wants to reach the server at 172.30.0.10, which ip will it use?
Anton [14]
The IP address that it will use is 192.168.16.100
3 0
4 years ago
Read 2 more answers
Importance of word processing application​
alina1380 [7]

Answer:

Some of the functions of word processing software include: Creating, editing, saving and printing documents. Copying, pasting, moving and deleting text within a document. Formatting text, such as font type, bolding, underlining or italicizing.

Explanation:

8 0
4 years ago
Danilo is planning the art to include in a business proposal his team is preparing. For which of the following items should Dani
Flura [38]
<span>A photo he found using an Internet search engine</span>
6 0
4 years ago
Read 2 more answers
In terms of technolagy, soft wear is defined as
tia_tia [17]

Answer:

the programs and other operating information used by a computer.

Explanation:

4 0
3 years ago
While working in a group of two the members are not getting along. You bring the two members together so they can discuss this i
Sergio [31]

Answer:

D)

Explanation:

At first the two members just want to create the presentation but work together and agree to share the research and work together on creating the presentation.

The conflict resolution is more than agree upon problem, identify issue or brainstorm solutions. The answer is D) negotiate a solution.

3 0
2 years ago
Other questions:
  • Consider an interface p ublic interface NumberFormatter { String format (in n); } Provide four classes that implement this inter
    15·1 answer
  • Each​ _____ in a relational database table is a unique record of something that users want to track.
    14·1 answer
  • How to select the entire table in microsoft excel
    11·1 answer
  • To quickly jump to the last cell in a worksheet press ____.
    15·1 answer
  • Chunking is a good strategy for completing large assignments because it makes the work
    7·2 answers
  • Match each Excel term to its definition. cell a group of cells containing related data ribbon a row of tabs, groups, and command
    10·1 answer
  • In the program below, numA is a _____.
    8·2 answers
  • The term platform as a service has generally meant a package of security services offered by a service provider that offloads mu
    9·1 answer
  • Who is maintain data and time of computer?​
    5·1 answer
  • Which new development in malware caused sandbox technology to automate and introduce artificial intelligence learning
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!