Computer Science, asked by shaivi97, 1 month ago

36) Write a proqram to accept N number in an array.
Input a number and find if the number is present in
or not.


atrs7391: programming language

Answers

Answered by Anonymous
2

Answer:#include <stdio.h>

void main()

{

  int i,n,a[100];

   

      printf("\n\nRead n number of values in an array and display it in reverse order:\n");

      printf("------------------------------------------------------------------------\n");

   

  printf("Input the number of elements to store in the array :");

  scanf("%d",&n);

   

  printf("Input %d number of elements in the array :\n",n);

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

     {

  printf("element - %d : ",i);

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

  }

     

  printf("\nThe values store into the array are : \n");

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

    {

   printf("% 5d",a[i]);

 }

 

  printf("\n\nThe values store into the array in reverse are :\n");

  for(i=n-1;i>=0;i--)

     {

   printf("% 5d",a[i]);

  }

  printf("\n\n");

Explanation:

Similar questions