473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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?
Expand|Select|Wrap|Line Numbers
  1. #include <iostream>
  2. #include <conio.h>
  3. #include <cstdlib> 
  4. #include <math.h>
  5. #include <stdio.h>
  6. #include <time.h>
  7. using namespace std;
  8.  
  9.     int i, j;
  10.     int x[6];
  11.     int A[6], B[6], C[6], D[6], E[6], F[6]; 
  12.     // The members of the array    int minimum = numbers[0] ; 
  13.      int minimum;
  14.     int  main(void)
  15. {
  16. {
  17.     for(i=1;i<7;i++)
  18.  
  19. {
  20.     for(i=1;i<7;i++)
  21. {
  22.     x[i]=i;
  23.     A[i]=(2+pow(x[i],2));
  24.     B[i]=(1+pow(x[i],3));
  25.     C[i]=(2+pow(x[i],2)-1);
  26.     D[i]=(3*pow(x[i],3));
  27.     E[i]=(1+pow(x[i],2));
  28.     F[i]=(3+pow(x[i],2));
  29. }
  30. {
  31.     printf("\n");
  32.  
  33.     for(i=1;i<7; i++)
  34.  
  35. {   
  36.     printf("[%d][%d] A[%d]=%d\n", i,1, i, A[i]); 
  37. }
  38.     printf("\n");
  39.     for(i=1;i<7; i++)
  40.  
  41. {   
  42.     printf("[%d][%d] B[%d]=%d\n", i,2, i, B[i]); 
  43.  
  44.     printf("\n");
  45.     for(i=1;i<7; i++)
  46.  
  47. {   
  48.     printf("[%d][%d] C[%d]=%d\n", i,3, i, C[i]); 
  49.  
  50. }
  51.     printf("\n");
  52.     for(i=1;i<7; i++)
  53.  
  54. {   
  55.     printf("[%d][%d] D[%d]=%d\n", i,4, i, D[i]); 
  56.  
  57. }
  58.     printf("\n");
  59.     for(i=1;i<7; i++)
  60.  
  61. {   
  62.     printf("[%d][%d] E[%d]=%d\n", i,5, i, E[i]); 
  63. }        
  64.     printf("\n");
  65.     for(i=1;i<7; i++)
  66.  
  67. {   
  68.     printf("[%d][%d] F[%d]=%d\n", i,6, i, F[i]); 
  69. }
  70. }
  71. }
  72. }
  73.     printf("\n");
  74.  
  75.     printf  ("A\tB\tC\tD\tE\tF");
  76.     printf  ("\n_\t_\t_\t_\t_\t_\t");
  77.  
  78.     for(i=1;i<7;i++)
  79. {
  80.     cout<<endl;
  81.  
  82.     printf("%d\t",  A[i]);
  83.     printf("%d\t",  B[i]);   
  84.     printf("%d\t",  C[i]);
  85.     printf("%d\t",  D[i]);
  86.     printf("%d\t",  E[i]);
  87.     printf("%d\t",  F[i]);
  88. }
  89.  
  90.  
  91.     // Compare the members
  92.     minimum = A[i], B[i],C[i], D[i], E[i], F[i];    for (int i = 1; i < 7; ++i) 
  93.     {
  94.         if (A[i], B[i],C[i], D[i], E[i],F[i] < minimum)
  95.         minimum = A[i], B[i],C[i], D[i], E[i],F[i];    }
  96.  
  97.    printf("\n");
  98.     // Announce the result
  99.     cout << "The lowest member value of the array is "<< minimum << "." << endl;
  100.  
  101.     return 0;
  102. }
Oct 30 '07 #1
1 1333
sicarie
4,677 Expert Mod 4TB
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
Oct 30 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: lawrence | last post by:
I had some code that worked fine for several weeks, and then yesterday it stopped working. I'm not sure what I did. Nor can I make out why it isn't working. I'm running a query that should return 3...
2
by: jerrygarciuh | last post by:
Hello, In this sample script I create an array of objects. Print out their data with print_r().Update their data with a sub called v_set(). Print out data showing the chnages using print_r(). I...
4
by: Michael Kirchner | last post by:
Hi everybody The output of my multiple dimension array is quite confusing. Im declaring an array, store some values in it and then I save the array in a session variable. On an other page I...
8
by: Scott J. McCaughrin | last post by:
The following program compiles fine but elicits this message from the linker: "undefined reference to VarArray::funct" and thus fails. It seems to behave as if the static data-member:...
5
by: Kutty Banerjee | last post by:
hi , i ve int (*Data); int A={1,2,3,4}; Data=&A; //Question here, how d i dynamically allocate space for Data using calloc? printf("%d\n",*Data) ; //gives 1 //But printf("%d\n",*Data)...
10
by: Bart Goeman | last post by:
Hi, I have a question about how to put redundant information in data structures, initialized at compile time. This is often necessary for performance reasons and can't be done at run time (data...
1
by: becca0619 | last post by:
Hey, Ive been looking around to find out how to read data into a 2D array and I cant find a solution that will fit my assignment. Im not sure that I should even use an array actually... ok so...
8
by: brainflakes.org | last post by:
Hi guys, I need to manipulate binary data (8 bit) stored in a 2 dimensional array. I've tried various methods (arrays, using a string filled with chr(0), using gd lib) and so far the fastest...
5
KevinADC
by: KevinADC | last post by:
Introduction This discussion of the sort function is targeted at beginners to perl coding. More experienced perl coders will find nothing new or useful. Sorting lists or arrays is a very common...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.