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
Dynamic disk storage provides the flexibility to logically organize disk space across one or more disk drives.
zhuklara [117]
<span>Dynamic disk storage provides the flexibility to logically organize disk space across one or more disk drives. 
a. True 
b. False</span>
3 0
3 years ago
Technician A says that generic scan tools must be able to read all generic OBD-II codes. Technician B says that all generic scan
Likurg_2 [28]

Answer:

A. Technicians A and B

Explanation:

When we're talking about generic scanners and about all OBD-II codes, in this case, both technician A and B is the correct answer. Because we can scan all OBD-II codes with a generic scan.

But the technician A just says generic tools must be able to read all generic OBD-II codes and technicians B just says generic scan tools must be able to read manufacture OBD-II code, both are correct.

4 0
3 years ago
Write an algorithm to find the maximum and minimum number from a given list of N numbers .Assume the list is not sorted
Y_Kistochka [10]
MaxNumber = 0
minNumber = INT_MAX

for n in list:
  if( n > maxNumber):
   maxNumber = n
  elif( n < minNumber ):
   minNumber = n
4 0
3 years ago
Available positions in animation cannot be found on the internet. True False
Nadusha1986 [10]
False, many applications for certain jobs/careers can be found online nowadays. Sites such as craigslist, angie.com, care.com, even cartoon website job applications can be applied for via the internet. I conclusion, I believe the correct answer false.
7 0
3 years ago
Read 2 more answers
The link between violence in the media and school shootings has been proven to be direct. True/false?​
Sveta_85 [38]

Answer:

most of the time a school shooting will be done by a kis that has been bullied and picked on a lot (aka the quiet kid ) if we could stop bullying we could decreese the number of school shootins by a lot

Explanation:

8 0
3 years ago
Other questions:
  • Computers are said to use binary data because all computer data is simply a series of Os and 1s.
    10·1 answer
  • The blank contains the computer's brain the central processing unit CPU
    8·1 answer
  • Which of the following is true of how the Internet has responded to the increasing number of devices now using the network?
    7·1 answer
  • Describe the dynamic Network Address Translation (NAT).
    9·1 answer
  • 20 points
    7·1 answer
  • When all the system testing and bugs correction has done, the software product will be delivered to the user for __________.
    15·1 answer
  • Which option is the easiest way to configure macros in Access 2016?
    6·1 answer
  • Downlad the file and write a program named Lab10b_Act2.py that does the following: Opens the CSV file for reading Reads the CSV
    15·1 answer
  • Convert the following binary to decimal number . <br>a). 101101 ​
    11·2 answers
  • Which device allows users to directly hear data from a computer
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!