all data array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • keith katthy
    New Member
    • Oct 2007
    • 24

    #1

    all data array

    Is it true I do like below, if I want to all data array? and the ouput is 2. How to know which array that computer take?
    [code=cpp]
    #include <iostream>
    #include <conio.h>
    #include <cstdlib>
    #include <math.h>
    #include <stdio.h>
    #include <time.h>
    using namespace std;

    int i, j;
    int x[6];
    int A[6], B[6], C[6], D[6], E[6], F[6];
    // The members of the array int minimum = numbers[0] ;
    int minimum;
    int main(void)
    {
    {
    for(i=1;i<7;i++ )

    {
    for(i=1;i<7;i++ )
    {
    x[i]=i;
    A[i]=(2+pow(x[i],2));
    B[i]=(1+pow(x[i],3));
    C[i]=(2+pow(x[i],2)-1);
    D[i]=(3*pow(x[i],3));
    E[i]=(1+pow(x[i],2));
    F[i]=(3+pow(x[i],2));
    }
    {
    printf("\n");

    for(i=1;i<7; i++)

    {
    printf("[%d][%d] A[%d]=%d\n", i,1, i, A[i]);
    }
    printf("\n");
    for(i=1;i<7; i++)

    {
    printf("[%d][%d] B[%d]=%d\n", i,2, i, B[i]);

    }
    printf("\n");
    for(i=1;i<7; i++)

    {
    printf("[%d][%d] C[%d]=%d\n", i,3, i, C[i]);

    }
    printf("\n");
    for(i=1;i<7; i++)

    {
    printf("[%d][%d] D[%d]=%d\n", i,4, i, D[i]);

    }
    printf("\n");
    for(i=1;i<7; i++)

    {
    printf("[%d][%d] E[%d]=%d\n", i,5, i, E[i]);
    }
    printf("\n");
    for(i=1;i<7; i++)

    {
    printf("[%d][%d] F[%d]=%d\n", i,6, i, F[i]);
    }
    }
    }
    }
    printf("\n");

    printf ("A\tB\tC\tD\tE \tF");
    printf ("\n_\t_\t_\t_\ t_\t_\t");

    for(i=1;i<7;i++ )
    {
    cout<<endl;

    printf("%d\t", A[i]);
    printf("%d\t", B[i]);
    printf("%d\t", C[i]);
    printf("%d\t", D[i]);
    printf("%d\t", E[i]);
    printf("%d\t", F[i]);
    }


    // Compare the members
    minimum = A[i], B[i],C[i], D[i], E[i], F[i]; for (int i = 1; i < 7; ++i)
    {
    if (A[i], B[i],C[i], D[i], E[i],F[i] < minimum)
    minimum = A[i], B[i],C[i], D[i], E[i],F[i];
    }

    printf("\n");
    // Announce the result
    cout << "The lowest member value of the array is "<< minimum << "." << endl;

    return 0;
    }[/code]
    Last edited by sicarie; Oct 30 '07, 01:07 PM. Reason: Code tags
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #2
    keith katthy-

    You have been banned for non-observance of the Posting Guidelines. This ban will expire in 7 days, however, any further violations of the Posting Guidelines will result in an immediate and permanent ban from this site.

    sicarie

    Comment

    Working...