how can i make program using arrays related to my course civil engineering?
answer please?

#include<stdio.h>
#include<conio.h>
main()
{     int odd[10];

      printf("\nEnter Ten Numbers: ");

      for(int ctr1=0; ctr1<=9; ctr1++)
      { scanf("%d", &odd[ctr1]); }

      printf("ODD NUMBERS: ");

      for(int ctr2=0; ctr2<=9; ctr2++)
      { if(odd[ctr2]%2!=0)
        { printf("%d ", odd[ctr2]); } }

      getch(); }

Edited 3 Years Ago by Dani: Formatting fixed

#include<stdio.h>
#include<conio.h>
main()
{
      int num[10];

      printf("\nEnter Ten Numbers: ");

      for(int ctr1=0; ctr1<=9; ctr1++)
      { scanf("%d", &num[ctr1]); }

      printf("ORDERED NUMBERS: ");

      for(int ctr2=0; ctr2<=8; ctr2++)
      { for(int ctr3=ctr2+1; ctr3<=9; ctr3++)
        { if(num[ctr2] > num[ctr3])
          { int temp=num[ctr2];
            num[ctr2]=num[ctr3];
            num[ctr3]=temp; } } }

      for(int ctr4=0; ctr4<=9; ctr4++)
      { printf("%d ", num[ctr4]); }

      getch();
      }

Edited 3 Years Ago by Dani: Formatting fixed

#include<stdio.h>
#include<conio.h>
main()
{
      int num[20];
      printf("\nEnter Twenty Numbers: ");
      for(int ctr1=0; ctr1<=19; ctr1++)
      {
              scanf("%d", &num[ctr1]);
      }
      printf("POSITIVE NUMBERS: ");
        for(int ctr2=0; ctr2<=19; ctr2++)
      {
                if(num[ctr2] >= 0)
        {
                printf("%d ", num[ctr2]);
                }
                }
      printf("\nNEGATIVE NUMBERS: ");

      for(int ctr3=0; ctr3<=19; ctr3++)
      {if(num[ctr3] < 0)
       {printf("%d ", num[ctr3]);
       }}
          getch(); 
      }

Edited 3 Years Ago by Dani: Formatting fixed

how can i make program using arrays related to my course civil engineering?
answer please?

Please, use code tags when you post. It makes it easier to read. Also, in your programming, the language you are using is C, not C++. You also are using main incorrect. you want to declare main as such

int main(){
...
}

Now what exactly is your issue that you are attempting to do? Your Op is vague.

This article has been dead for over six months. Start a new discussion instead.